Skip to content

Merge pull request #203 from mgcam/drop_unused_method #190

Merge pull request #203 from mgcam/drop_unused_method

Merge pull request #203 from mgcam/drop_unused_method #190

name: Publish Docker image to ghcr.io
on:
push:
branches:
- "master"
- "devel"
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Build and push docker images
run: |
# Set BRANCH to latest if BRANCH is master
[ $BRANCH = "master" ] && BRANCH=latest
docker build --target production --label $REPOLABEL -t ghcr.io/${{ github.repository_owner }}/npg_langqc:${BRANCH} .
docker image push ghcr.io/${{ github.repository_owner}}/npg_langqc:${BRANCH}
env:
REPOLABEL: "org.opencontainers.image.source=${{ github.repository_url }}"
BRANCH: ${{ github.ref_name }}