Merge pull request #1279 from microbiomedata/berkeley-fix-image-tag #3
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build-berkeley-image | |
on: | |
push: | |
branches: | |
- berkeley-schema-migration | |
env: | |
IS_ORIGINAL_REPO: ${{ github.repository == 'microbiomedata/nmdc-server' }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
image: [server, client, worker] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Login to Github Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: | | |
ghcr.io/microbiomedata/nmdc-server/${{ matrix.image }} | |
flavor: | | |
latest=false | |
prefix=berkeley | |
tags: | | |
type=ref,event=branch | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
context: ${{ matrix.image == 'client' && 'web' || '.' }} | |
push: ${{ env.IS_ORIGINAL_REPO }} | |
file: ${{ matrix.image == 'worker' && 'Dockerfile.worker' || matrix.image == 'client' && 'web/Dockerfile' || 'Dockerfile' }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} |