Skip to content

Commit

Permalink
Using meta for build tags
Browse files Browse the repository at this point in the history
  • Loading branch information
allgood authored May 15, 2024
1 parent 25ce152 commit d61a6b6
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Docker meta Backend
id: meta_backend
id: metabackend
uses: docker/metadata-action@v3
with:
# list of Docker images to use as base name for tags
Expand All @@ -51,7 +51,7 @@ jobs:
type=sha
- name: Docker meta Frontend
id: meta_frontend
id: metafrontend
uses: docker/metadata-action@v3
with:
# list of Docker images to use as base name for tags
Expand All @@ -72,9 +72,7 @@ jobs:
context: ./backend
push: true
platforms: linux/amd64,linux/arm64
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_BACKEND }}:latest
${{ env.REGISTRY }}/${{ env.IMAGE_BACKEND }}:${{ github.sha }}
tags: ${{ steps.metabackend.outputs.tags }}

- name: Build and push frontend Docker image
id: frontend
Expand All @@ -83,6 +81,4 @@ jobs:
context: ./frontend
push: true
platforms: linux/amd64,linux/arm64
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_FRONTEND }}:latest
${{ env.REGISTRY }}/${{ env.IMAGE_FRONTEND }}:${{ github.sha }}
tags: ${{ steps.metafrontend.outputs.tags }}

0 comments on commit d61a6b6

Please sign in to comment.