diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index e61d953..7bf1947 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -14,8 +14,22 @@ jobs: runs-on: ${{ matrix.os }} + permissions: + contents: read + packages: write + steps: - uses: actions/checkout@v3 + - name: Docker Metadata action + uses: docker/metadata-action@v5.5.1 + id: meta + with: + images: | + ghcr.io/${{ github.repository }} + tags: | + type=ref,event=branch + type=semver,pattern={{version}} + - uses: docker/setup-buildx-action@v2 - uses: docker/setup-qemu-action@v2 - uses: docker/login-action@v2 @@ -24,8 +38,10 @@ jobs: username: ${{ github.actor }} password: ${{ github.token }} - - uses: docker/build-push-action@v3 + - name: Build and push Docker images + uses: docker/build-push-action@v6.9.0 with: push: true platforms: linux/amd64,linux/arm64 - tags: ghcr.io/${{ github.repository }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }}