aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKunoiSayami <[email protected]>2026-08-17 19:58:56 +0800
committerKunoiSayami <[email protected]>2026-08-17 19:58:56 +0800
commitfda189ddb464685e9ab91eea7ffd82237903d209 (patch)
treea696310548fe754d9aa064889446cf80d40d5ae6
parent3479a3e08d3a67db06ed06d692d09ecbd213ba7d (diff)
ci: Add rathole update job and bump checkout to v7
Add an update-rathole job that tracks rapiz1/rathole releases and bumps repo/rathole/PKGBUILD, mirroring the existing package update jobs. Also update actions/checkout from v6 to v7 across all jobs. Signed-off-by: KunoiSayami <[email protected]>
-rw-r--r--.github/workflows/update-pkgbuilds.yml55
1 files changed, 51 insertions, 4 deletions
diff --git a/.github/workflows/update-pkgbuilds.yml b/.github/workflows/update-pkgbuilds.yml
index e33843d..1958f98 100644
--- a/.github/workflows/update-pkgbuilds.yml
+++ b/.github/workflows/update-pkgbuilds.yml
@@ -12,7 +12,7 @@ jobs:
permissions:
contents: write
steps:
- - uses: actions/checkout@v6
+ - uses: actions/checkout@v7
- name: Get latest pre-release version
id: version
@@ -84,7 +84,7 @@ jobs:
permissions:
contents: write
steps:
- - uses: actions/checkout@v6
+ - uses: actions/checkout@v7
- name: Get latest version from CMakeLists.txt
id: version
@@ -135,7 +135,7 @@ jobs:
permissions:
contents: write
steps:
- - uses: actions/checkout@v6
+ - uses: actions/checkout@v7
- name: Get latest release version
id: version
@@ -197,7 +197,7 @@ jobs:
permissions:
contents: write
steps:
- - uses: actions/checkout@v6
+ - uses: actions/checkout@v7
- name: Get latest release version
id: version
@@ -237,3 +237,50 @@ jobs:
git add repo/ksutils-teamspeak-management-tools/PKGBUILD
git commit -m "feat(pkg): Update ksutils-teamspeak-management-tools to ${VERSION}"
git push || (git pull --rebase && git push)
+
+ update-rathole:
+ name: Update rathole
+ runs-on: ubuntu-latest
+ permissions:
+ contents: write
+ steps:
+ - uses: actions/checkout@v7
+
+ - name: Get latest release version
+ id: version
+ env:
+ GH_TOKEN: ${{ github.token }}
+ run: |
+ VERSION=$(gh api repos/rapiz1/rathole/releases/latest \
+ --jq '.tag_name | ltrimstr("v")')
+ echo "version=$VERSION" >> "$GITHUB_OUTPUT"
+
+ - name: Check current version
+ id: check
+ run: |
+ CURRENT=$(grep '^pkgver=' repo/rathole/PKGBUILD | cut -d'=' -f2)
+ echo "current=$CURRENT" >> "$GITHUB_OUTPUT"
+ if [ "$CURRENT" = "${{ steps.version.outputs.version }}" ]; then
+ echo "skip=true" >> "$GITHUB_OUTPUT"
+ else
+ echo "skip=false" >> "$GITHUB_OUTPUT"
+ fi
+
+ - name: Update PKGBUILD
+ if: steps.check.outputs.skip == 'false'
+ env:
+ VERSION: ${{ steps.version.outputs.version }}
+ run: |
+ sed -i "s/^pkgver=.*/pkgver=${VERSION}/" repo/rathole/PKGBUILD
+ sed -i "s/^pkgrel=.*/pkgrel=1/" repo/rathole/PKGBUILD
+
+ - name: Commit and push
+ if: steps.check.outputs.skip == 'false'
+ env:
+ VERSION: ${{ steps.version.outputs.version }}
+ run: |
+ git config user.name "github-actions[bot]"
+ git config user.email "github-actions[bot]@users.noreply.github.com"
+ git add repo/rathole/PKGBUILD
+ git commit -m "feat(pkg): Update rathole to ${VERSION}"
+ git push || (git pull --rebase && git push)