Skip to content

Commit

Permalink
Add github release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Wang committed Dec 4, 2020
1 parent a0f5c9b commit 7550f96
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
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
- 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.CR_PAT }}
registry: ghcr.io
tags: latest,${{ steps.get_version.outputs.VERSION }}

0 comments on commit 7550f96

Please sign in to comment.