Skip to content

Commit 71144d6

Browse files
committed
chore(ci): use su to run makepkg
1 parent ebe77a7 commit 71144d6

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ jobs:
5555
bsdtar -C / -xvf $patched_glibc
5656
- name: Prepare artifacts
5757
run: |
58-
su - pcr
5958
cd /home/pcr
6059
6160
# Get sources
6261
./pull.bash
62+
chown -R pcr:pcr emacs
6363
6464
# Create artifacts
65-
makepkg
65+
su pcr -c "makepkg"
6666
6767
# Unpack artifacts
6868
mkdir out
@@ -86,8 +86,6 @@ jobs:
8686
sed 's/^[^[:alnum:]]*//' | \
8787
# Prepend "- " to the message
8888
sed -r 's/(.*)/- \1/' >> body.md
89-
90-
exit
9189
- name: Create Release
9290
id: create_release
9391
uses: actions/create-release@v1
@@ -114,7 +112,6 @@ jobs:
114112
PRIV_KEY: ${{ secrets.PRIV_KEY }}
115113
PUB_KEY: ${{ secrets.PUB_KEY }}
116114
run: |
117-
su - pcr
118115
cd /home/pcr
119116
120117
# Checksum artifacts
@@ -139,11 +136,9 @@ jobs:
139136
sed -i -r -e 's~sha512sums=.*~sha512sums=\("'"$sum"'"\)~' PKGBUILD
140137
sed -i -r -e 's/pkgrel=.*/pkgrel=1/' PKGBUILD
141138
rm .SRCINFO
142-
makepkg --printsrcinfo > .SRCINFO
139+
su pcr -c "makepkg --printsrcinfo > .SRCINFO"
143140
144141
# Push changes
145142
mygit add .SRCINFO PKGBUILD
146143
mygit commit -m "Bump to $PKG_VERSION"
147144
mygit push origin master
148-
149-
exit

0 commit comments

Comments
 (0)