Skip to content

Commit a32381a

Browse files
committed
try fix push workflow git troubles
1 parent bde5b62 commit a32381a

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
run: |
2121
pacman -Syu --noconfirm --needed base-devel devtools git sudo
2222
23-
- name: Set up SSH key manually
23+
- name: Set up SSH key
2424
run: |
2525
mkdir -p /root/.ssh
2626
echo "${{ secrets.AUR_SSH_KEY }}" > /root/.ssh/id_ed25519
@@ -33,11 +33,6 @@ jobs:
3333
StrictHostKeyChecking no
3434
EOF
3535
36-
- name: Configure Git
37-
run: |
38-
git config --global user.name "github-actions"
39-
git config --global user.email "github-actions@github.com"
40-
4136
- name: Create builder user
4237
run: |
4338
useradd -m builder
@@ -50,25 +45,30 @@ jobs:
5045
current=$(grep "^pkgrel=" PKGBUILD | cut -d= -f2)
5146
new=$((current + 1))
5247
53-
sudo -u builder sed -i "s/^pkgrel=.*/pkgrel=$new/" PKGBUILD
48+
echo "Updating pkgrel: $current → $new"
5449
55-
echo "Bumped pkgrel: $current → $new"
50+
sudo -u builder sed -i "s/^pkgrel=.*/pkgrel=$new/" PKGBUILD
5651
5752
echo "new=$new" >> $GITHUB_ENV
5853
5954
- name: Generate .SRCINFO
6055
run: |
6156
sudo -u builder makepkg --printsrcinfo > .SRCINFO
6257
58+
- name: Configure Git for builder
59+
run: |
60+
sudo -u builder git config --global user.name "github-actions"
61+
sudo -u builder git config --global user.email "github-actions@github.com"
62+
6363
- name: Add AUR remote
6464
run: |
65-
git remote add aur ssh://aur@aur.archlinux.org/path-utils.git
65+
sudo -u builder git remote add aur ssh://aur@aur.archlinux.org/path-utils.git
6666
6767
- name: Commit changes
6868
run: |
69-
git add PKGBUILD .SRCINFO
70-
git commit -m "Bump pkgrel to ${{ env.new }} [skip ci]" || echo "No changes to commit"
69+
sudo -u builder git add PKGBUILD .SRCINFO
70+
sudo -u builder git commit -m "Bump pkgrel to ${{ env.new }} [skip ci]" || echo "No changes to commit"
7171
7272
- name: Push to AUR
7373
run: |
74-
git push aur master
74+
sudo -u builder git push aur master

0 commit comments

Comments
 (0)