Skip to content

Nextflow scripts for export (#272) #188

Nextflow scripts for export (#272)

Nextflow scripts for export (#272) #188

name: Publish Docker
on:
push:
branches:
- main
- master
# pull_request: ~
env:
REGISTRY: ghcr.io
jobs:
build-api:
runs-on: ubuntu-latest
defaults:
run:
working-directory: .
steps:
- name: Checkout
uses: actions/checkout@v4.1.0
with:
fetch-depth: 0
- name: Log in to the Container registry
uses: docker/login-action@v2.2.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build image label
id: image-label
run: |
echo "version=$(make api.version)" >> $GITHUB_OUTPUT
echo "image_name=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')-api" >> $GITHUB_OUTPUT
- name: Build and push Docker image (version tag)
uses: docker/build-push-action@v4.2.0
with:
context: .
file: api/Dockerfile
push: true
tags: ghcr.io/${{ steps.image-label.outputs.image_name }}:${{ steps.image-label.outputs.version }}
labels: ${{ steps.meta.outputs.labels }}
- name: Build and push Docker image (latest tag)
if: steps.check-version.outputs.current-version
uses: docker/build-push-action@v4.2.0
with:
context: .
file: api/Dockerfile
push: true
tags: ghcr.io/${{ steps.image-label.outputs.image_name }}:latest
labels: ${{ steps.meta.outputs.labels }}