Skip to content

Commit f92af61

Browse files
committed
try fix push workflow git troubles 5
1 parent c7e2acf commit f92af61

1 file changed

Lines changed: 10 additions & 14 deletions

File tree

.github/workflows/release-to-aur.yml

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,16 @@ jobs:
1515
- name: Checkout repository
1616
uses: actions/checkout@v4
1717

18-
- name: Install Git
19-
run: sudo apt update && sudo apt install -y git
20-
21-
- name: Clone AUR repo to get current pkgrel
22-
run: |
23-
git clone --depth=1 ssh://aur@aur.archlinux.org/path-utils.git aur-temp
24-
current=$(grep "^pkgrel=" aur-temp/PKGBUILD | cut -d= -f2)
25-
echo "current_pkgrel=$current" >> $GITHUB_ENV
26-
27-
- name: Bump pkgrel in GitHub PKGBUILD
18+
- name: Bump pkgrel
19+
id: bump
2820
run: |
29-
new=$((env.current_pkgrel + 1))
21+
current=$(grep "^pkgrel=" PKGBUILD | cut -d= -f2)
22+
new=$((current + 1))
23+
3024
sed -i "s/^pkgrel=.*/pkgrel=$new/" PKGBUILD
31-
echo "Bumped pkgrel from ${{ env.current_pkgrel }} → $new"
25+
26+
echo "Bumped pkgrel: $current → $new"
27+
3228
echo "new_pkgrel=$new" >> $GITHUB_ENV
3329
3430
- name: Publish to AUR
@@ -42,10 +38,10 @@ jobs:
4238
commit_message: "Bump pkgrel to ${{ env.new_pkgrel }}"
4339
ssh_keyscan_types: rsa,ecdsa,ed25519
4440

45-
- name: Commit updated PKGBUILD back to GitHub
41+
- name: Commit updated PKGBUILD with [skip ci]
4642
run: |
4743
git config user.name "github-actions"
4844
git config user.email "github-actions@github.com"
4945
git add PKGBUILD
5046
git commit -m "Update pkgrel to ${{ env.new_pkgrel }} [skip ci]" || echo "No changes to commit"
51-
git push origin master || echo "Push failed (maybe no changes)"
47+
git push origin master || echo "Push failed (maybe no changes)"

0 commit comments

Comments
 (0)