Skip to content

worflows change + config #1

worflows change + config

worflows change + config #1

Workflow file for this run

name: Build and publish Docker images
#on:
# push:
# branches:
# - main
# - master
# tags:
# - 'v*'
# release:
# types: [published]
on:
pull_request:
push:
jobs:
build-image:
runs-on: ubuntu-22.04
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: Login to Github Packages
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta for latest
if: ${{ ! startsWith(github.ref, 'refs/tags/') }}
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/lablabs/aws-service-quotas-exporter
tags: |
type=raw,value=latest
- name: Docker meta for tag
if: startsWith(github.ref, 'refs/tags/')
id: meta

Check failure on line 50 in .github/workflows/docker.yaml

View workflow run for this annotation

GitHub Actions / Build and publish Docker images

Invalid workflow file

The workflow is not valid. .github/workflows/docker.yaml (Line: 50, Col: 13): The identifier 'meta' may not be used more than once within the same scope.
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/lablabs/aws-service-quotas-exporter
# generate Docker tags based on the following events/attributes
tags: |
type=raw,value=${{ github.ref_name }}
- name: Build image and push to GitHub Container Registry
uses: docker/build-push-action@v5
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 }}