Release a new version to Github Packages #24
Workflow file for this run
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: 'Release a new version to Github Packages' | |
on: | |
release: | |
types: [published] | |
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 | |
with: | |
ref: ${{ github.event.release.target_commitish }} | |
- name: Get the version | |
id: get_version | |
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} | |
- name: Push to GitHub Packages | |
uses: docker/build-push-action@v1 | |
with: | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
registry: ghcr.io | |
tags: latest,${{ steps.get_version.outputs.VERSION }} |