Skip to content

test Dockerfile

test Dockerfile #2

name: Build and Publish Docker Images after push to master branch
#on:
# push:
# branches: [master]
on:
push:
pull_request:
jobs:
build-and-push-docker-image:
name: Build Docker image and push to repositories with tag latest
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:

Check failure on line 27 in .github/workflows/docker-master.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/docker-master.yaml

Invalid workflow file

You have an error in your yaml syntax on line 27
images: |
# lablabs/aws-service-quotas-exporter
ghcr.io/lablabs/aws-service-quotas-exporter
# generate Docker tags based on the following events/attributes
tags: type=raw,value=latest
# - name: Login to DockerHub
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to Github Packages
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build image and push to Docker Hub and GitHub Container Registry
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
push: true
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}