Skip to content

Commit

Permalink
build: container version labels (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
alubbock authored Oct 10, 2024
1 parent 55fa77d commit 2e883ba
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,28 @@ jobs:
docker run --rm -e CI=true antigen-app-dev-frontend:latest npm test
docker run --rm antigen-app-dev-frontend:latest npx prettier --check .
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
quay.io/rosalindfranklininstitute/antigen-app-${{ matrix.component }}
# generate Docker tags based on the following events/attributes
tags: |
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- name: Build and push prod image
uses: docker/build-push-action@v6
with:
context: ${{ matrix.component }}
target: prod
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
tags: quay.io/rosalindfranklininstitute/antigen-app-${{ matrix.component }}:latest
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 2e883ba

Please sign in to comment.