Skip to content

ci: require newer gmap #9

ci: require newer gmap

ci: require newer gmap #9

Workflow file for this run

name: build-docker
on:
push:
branches:
- "docker**"
paths:
- .github/workflows/build-docker.yml
- Dockerfile
- mimseq/version.py
env:
dockerfile: "Dockerfile"
namespace: "nciccbr"
image_name: "tranquil_mimseq"
push: "true"
jobs:
build-docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Login to DockerHub
if: ${{ env.push == 'true' }}
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Prepare build-time variables
id: vars
run: |
echo "VERSION=$( cat mimseq/version.py | grep -oP 'v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?' )" >> "$GITHUB_OUTPUT"
echo "CONTEXT=$(dirname ${{ env.dockerfile }})" >> "$GITHUB_OUTPUT"
echo "DATE=$(date +"%Y-%m-%d")" >> "$GITHUB_OUTPUT"
- name: Build and push
uses: docker/build-push-action@v4
with:
context: ${{ steps.vars.outputs.CONTEXT }}
file: ${{ env.dockerfile }}
push: ${{ env.push }}
tags: ${{ env.namespace }}/${{ env.image_name }}:${{ steps.vars.outputs.VERSION }}