Merge pull request #219 from mgcam/light_well_button #200
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: 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 }} | |