Skip to content

Commit

Permalink
ci: update release process
Browse files Browse the repository at this point in the history
  • Loading branch information
jvoss committed Jul 13, 2023
1 parent 532d951 commit cb13c7a
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name: Image Build and Push
on:
push:
branches: [main]
release:
types: [published]

jobs:
build-and-push-image:
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Release Build and Publish
on:
release:
types: [published]

jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Get release version
id: get_version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and Push Image
uses: docker/build-push-action@v4
with:
push: true
tags: |
ghcr.io/routedbits/pingfinder:${{ env.RELEASE_VERSION }}

0 comments on commit cb13c7a

Please sign in to comment.