Skip to content

Updated images.

Updated images. #2

name: 'Publish Docker image to GitHub Packages'
# We don't actually want to publish this to GitHub Packages, because we'd rather host them at
# containers.renci.org. However, I'm going to leave this workflow here (without any triggers)
# in case it's needed in the future. Just uncomment the `on:` triggers if needed.
#
#on:
# release:
# types: [published]
env:
REGISTRY: ghcr.io
jobs:
push_to_registry:
name: Push Docker image to GitHub Packages tagged with "latest" and version number.
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images:
ghcr.io/${{ github.repository }}
- name: Login to ghcr
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push to GitHub Packages
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: BRANCH_NAME=${{ github.event.release.target_commitish }}