Skip to content

Merge pull request #233 from nerdstrike/actually_render_product_metrics #214

Merge pull request #233 from nerdstrike/actually_render_product_metrics

Merge pull request #233 from nerdstrike/actually_render_product_metrics #214

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@v4
- 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 }}