diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index deb3356..a4dbc9b 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -6,7 +6,7 @@ on: env: REGISTRY: ghcr.io - IMAGE_NAME: ewpratten/base + IMAGE_NAME: ${{ github.repository }} jobs: build_x64: @@ -27,6 +27,12 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + - name: Build and push uses: docker/build-push-action@v2 with: @@ -34,7 +40,8 @@ jobs: file: ./Dockerfile platforms: linux/amd64 push: true - tags: ewpratten/base:latest + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} build_arm64: name: Build ARM64 @@ -57,6 +64,12 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + - name: Build and push uses: docker/build-push-action@v2 with: @@ -64,4 +77,5 @@ jobs: file: ./Dockerfile platforms: linux/arm64 push: true - tags: ewpratten/base:latest \ No newline at end of file + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file