Skip to content

Update github action to run on prs and install unxz command #55

Update github action to run on prs and install unxz command

Update github action to run on prs and install unxz command #55

Workflow file for this run

name: Docker Image CI
on:
push:
branches:
- master
- demo-*
pull_request:
# Only use GitHub Actions for testing, because the Docker image with Mutation Assessor data is too big to be built and pushed.
# CircleCI builds and pushes the images to Docker Hub for every new release.
jobs:
build_and_publish_grch37:
if: github.repository == 'genome-nexus/genome-nexus-importer'
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:
image_name: genomenexus/gn-mongo
image_tag: ${{ steps.extract_tags.outputs.image_tag_names }}
push_image_and_stages: false
build_and_publish_grch38:
if: github.repository == 'genome-nexus/genome-nexus-importer'
runs-on: ubuntu-latest
env:
Version: grch38_ensembl95
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"
# The format of image tag is e.g. v0.12_grch38_ensembl95
run: echo "##[set-output name=image_tag_name;]${GITHUB_REF##*/}_${Version}"
id: extract_tag
- name: 'Docker build with cache'
uses: whoan/docker-build-with-cache-action@v5
with:
build_extra_args: '{"--build-arg": "ARG_REF_ENSEMBL_VERSION=grch38_ensembl95"}'
image_name: genomenexus/gn-mongo
image_tag: ${{ steps.extract_tag.outputs.image_tag_name }}
push_image_and_stages: false
build_and_publish_grcm38:
if: github.repository == 'genome-nexus/genome-nexus-importer'
runs-on: ubuntu-latest
env:
Version: grcm38_ensembl95
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"
# The format of image tag is e.g. v0.12_grch38_ensembl95
run: echo "##[set-output name=image_tag_names;]$(echo ${GITHUB_REF##*/}_${Version})"
id: extract_tags
- name: 'Docker build with cache'
uses: whoan/docker-build-with-cache-action@v5
with:
build_extra_args: '--build-arg SPECIES=mus_musculus --build-arg REF_ENSEMBL_VERSION=grcm38_ensembl95'
image_name: genomenexus/gn-mongo
image_tag: ${{ steps.extract_tags.outputs.image_tag_names }}
push_image_and_stages: false