Skip to content

Commit

Permalink
Release: Add an on-release GHA to tag ghcr pkgs
Browse files Browse the repository at this point in the history
Rather than manuallyu execute a script for tagging ghcr packages
at release time, this can be more reliably automated in a github
action that's triggered on release. This new github action simply
calls the previous release-helper script support that is in place.

Signed-off-by: Chris Porter <[email protected]>
  • Loading branch information
portersrc committed Sep 26, 2024
1 parent 805c0d6 commit c38a095
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/publish-ghcr-pkgs-on-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Publish ghcr packages on trustee release

on:
release:
types: [published]

jobs:
publish-ghcr-packages:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Run release-helper-ghcr to tag ghcr release packages
env:
GH_TOKEN: ${{ github.token }}
GH_USERNAME: ${{ github.actor }}
GH_SHA: ${{ github.sha }}
run: |

Check failure on line 19 in .github/workflows/publish-ghcr-pkgs-on-release.yml

View workflow job for this annotation

GitHub Actions / Workflow Files

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2001:style:1:7: See if you can use ${variable//search/replace} instead [shellcheck] Raw Output: .github/workflows/publish-ghcr-pkgs-on-release.yml:19:9: shellcheck reported issue in this script: SC2001:style:1:7: See if you can use ${variable//search/replace} instead [shellcheck]

Check failure on line 19 in .github/workflows/publish-ghcr-pkgs-on-release.yml

View workflow job for this annotation

GitHub Actions / Workflow Files

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:1:12: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: .github/workflows/publish-ghcr-pkgs-on-release.yml:19:9: shellcheck reported issue in this script: SC2086:info:1:12: Double quote to prevent globbing and word splitting [shellcheck]

Check failure on line 19 in .github/workflows/publish-ghcr-pkgs-on-release.yml

View workflow job for this annotation

GitHub Actions / Workflow Files

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:3:29: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: .github/workflows/publish-ghcr-pkgs-on-release.yml:19:9: shellcheck reported issue in this script: SC2086:info:3:29: Double quote to prevent globbing and word splitting [shellcheck]

Check failure on line 19 in .github/workflows/publish-ghcr-pkgs-on-release.yml

View workflow job for this annotation

GitHub Actions / Workflow Files

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:3:45: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: .github/workflows/publish-ghcr-pkgs-on-release.yml:19:9: shellcheck reported issue in this script: SC2086:info:3:45: Double quote to prevent globbing and word splitting [shellcheck]

Check failure on line 19 in .github/workflows/publish-ghcr-pkgs-on-release.yml

View workflow job for this annotation

GitHub Actions / Workflow Files

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:3:58: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: .github/workflows/publish-ghcr-pkgs-on-release.yml:19:9: shellcheck reported issue in this script: SC2086:info:3:58: Double quote to prevent globbing and word splitting [shellcheck]

Check failure on line 19 in .github/workflows/publish-ghcr-pkgs-on-release.yml

View workflow job for this annotation

GitHub Actions / Workflow Files

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:3:69: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: .github/workflows/publish-ghcr-pkgs-on-release.yml:19:9: shellcheck reported issue in this script: SC2086:info:3:69: Double quote to prevent globbing and word splitting [shellcheck]
tag=$(echo $GITHUB_REF | sed 's|refs/tags/||')
cd hack
./release-helper-ghcr.sh -u $GH_USERNAME -k $GH_TOKEN -c $GH_SHA -r $tag

0 comments on commit c38a095

Please sign in to comment.