Merge pull request #256 from leexgh/fix-enrichment-fields #47
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: Docker Image CI | |
on: | |
push: | |
branches: | |
- master | |
- demo-* | |
tags: '*' | |
jobs: | |
build_and_publish: | |
if: github.repository == 'genome-nexus/genome-nexus-annotation-pipeline' | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Checkout git repo' | |
uses: actions/checkout@v1 | |
- name: Extract branch or tag name | |
# The GITHUB_REF variable is like "refs/head/branch_name" or | |
# "refs/tag/tag_name". If the tag is prefixed with v, this is a new | |
# version and we want to push it with the tag "latest" as well. One can give | |
# the same image multiple tags by using "," | |
run: echo "##[set-output name=image_tag_names;]$(echo ${GITHUB_REF##*/} | sed 's/^v/latest,/g')" | |
id: extract_tags | |
- name: 'Docker build with cache' | |
uses: whoan/docker-build-with-cache-action@v5 | |
with: | |
username: "${{ secrets.DOCKER_USERNAME }}" | |
password: "${{ secrets.DOCKER_PASSWORD }}" | |
image_name: genomenexus/gn-annotation-pipeline | |
image_tag: ${{ steps.extract_tags.outputs.image_tag_names }} | |
pull_image_and_stages: false |