aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/update-pkgbuilds.yml
diff options
context:
space:
mode:
authorKunoiSayami <[email protected]>2026-06-18 01:37:04 +0800
committerKunoiSayami <[email protected]>2026-06-18 01:37:04 +0800
commit6e7f7129b45dd010cc0713e2aeeb5ebfa34d6892 (patch)
tree76019a438a8b1de81c9e3d63c718b58eab47ee23 /.github/workflows/update-pkgbuilds.yml
parent7139ef47701d88ba0375348173d872063935cf8b (diff)
feat(ci): Support acme.sh-letsencrypt auto update
Co-Authored-By: Claude Sonnet 4.6 <[email protected]> Signed-off-by: KunoiSayami <[email protected]>
Diffstat (limited to '.github/workflows/update-pkgbuilds.yml')
-rw-r--r--.github/workflows/update-pkgbuilds.yml62
1 files changed, 62 insertions, 0 deletions
diff --git a/.github/workflows/update-pkgbuilds.yml b/.github/workflows/update-pkgbuilds.yml
index c594e1a..94b1b6e 100644
--- a/.github/workflows/update-pkgbuilds.yml
+++ b/.github/workflows/update-pkgbuilds.yml
@@ -129,6 +129,68 @@ jobs:
git commit -m "feat(pkg): Update telegram-bot-api to ${VERSION}"
git push
+ update-acme-sh-letsencrypt:
+ name: Update acme.sh-letsencrypt
+ runs-on: ubuntu-latest
+ permissions:
+ contents: write
+ steps:
+ - uses: actions/checkout@v6
+
+ - name: Get latest release version
+ id: version
+ env:
+ GH_TOKEN: ${{ github.token }}
+ run: |
+ VERSION=$(gh api repos/acmesh-official/acme.sh/releases/latest \
+ --jq '.tag_name | ltrimstr("v")')
+ echo "version=$VERSION" >> "$GITHUB_OUTPUT"
+
+ - name: Check current version
+ id: check
+ run: |
+ CURRENT=$(grep '^pkgver=' repo/acme.sh-letsencrypt/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: Compute sha512sum
+ if: steps.check.outputs.skip == 'false'
+ id: sums
+ env:
+ VERSION: ${{ steps.version.outputs.version }}
+ GIT_URL: https://github.com/acmesh-official/acme.sh
+ run: |
+ FILE="acme.sh-${VERSION}.tar.gz"
+ wget -q "$GIT_URL/archive/refs/tags/${VERSION}.tar.gz" -O "$FILE"
+ SUM=$(sha512sum "$FILE" | awk '{print $1}')
+ echo "sha512=$SUM" >> "$GITHUB_OUTPUT"
+ rm "$FILE"
+
+ - name: Update PKGBUILD
+ if: steps.check.outputs.skip == 'false'
+ env:
+ VERSION: ${{ steps.version.outputs.version }}
+ SHA512: ${{ steps.sums.outputs.sha512 }}
+ run: |
+ sed -i "s/^pkgver=.*/pkgver=${VERSION}/" repo/acme.sh-letsencrypt/PKGBUILD
+ sed -i "s/^pkgrel=.*/pkgrel=1/" repo/acme.sh-letsencrypt/PKGBUILD
+ sed -i "s/^sha512sums=.*/sha512sums=('${SHA512}')/" repo/acme.sh-letsencrypt/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/acme.sh-letsencrypt/PKGBUILD
+ git commit -m "feat(pkg): Update acme.sh-letsencrypt to ${VERSION}"
+ git push
+
update-ksutils-teamspeak-management-tools:
name: Update ksutils-teamspeak-management-tools
runs-on: ubuntu-latest