Add db migration script for additional acknowledgements #323
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: Publish Docker image | |
on: | |
push: | |
tags: | |
- "v[0-9]+.[0-9]+.[0-9]+" | |
- "dev[0-9]-v[0-9]+.[0-9]+.[0-9]+" | |
paths: | |
- "docker/**" | |
- "env/**" | |
- "app/**" | |
- "run/**" | |
- ".github/**" | |
jobs: | |
build_test_push: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Free Disk Space (Ubuntu) | |
uses: jlumbroso/free-disk-space@main | |
with: | |
tool-cache: false | |
large-packages: true | |
docker-images: false | |
swap-storage: true | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Prepare | |
id: prep | |
run: | | |
DOCKER_IMAGE=registry.gitlab.com/ncsa-blast/kubernetes/blast | |
if [[ $GITHUB_REF == refs/tags/v* ]]; then | |
VERSION=${GITHUB_REF#refs/tags/} | |
TAGS="${DOCKER_IMAGE}:${VERSION},${DOCKER_IMAGE}:latest" | |
elif [[ $GITHUB_REF == refs/tags/dev* ]]; then | |
VERSION=${GITHUB_REF#refs/tags/} | |
TAGS="${DOCKER_IMAGE}:${VERSION},${DOCKER_IMAGE}:dev" | |
fi | |
echo ::set-output name=tags::${TAGS} | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to container registry | |
if: github.event_name != 'pull_request' | |
uses: docker/login-action@v3 | |
with: | |
registry: "registry.gitlab.com" | |
username: "${{ secrets.GITLAB_REGISTRY_USERNAME }}" | |
password: "${{ secrets.GITLAB_REGISTRY_TOKEN }}" | |
- name: Build and export to Docker | |
id: docker_build | |
uses: docker/build-push-action@v6 | |
with: | |
builder: ${{ steps.buildx.outputs.name }} | |
context: ./app | |
file: ./app/Dockerfile | |
tags: ${{ steps.prep.outputs.tags }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
push: false | |
load: true | |
- name: Run tests | |
run: bash run/blastctl ci up | |
# - uses: codecov/codecov-action@v4 | |
# with: | |
# directory: app/ | |
- name: Push image | |
id: docker_push | |
uses: docker/build-push-action@v6 | |
with: | |
builder: ${{ steps.buildx.outputs.name }} | |
context: ./app | |
file: ./app/Dockerfile | |
tags: ${{ steps.prep.outputs.tags }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
platforms: linux/amd64 | |
push: true |