forked from heyhusen/archlinux-package-action
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathentrypoint.sh
executable file
·41 lines (36 loc) · 1.1 KB
/
entrypoint.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
# Set path
# echo '::group::Copying file from $WORKPATH to /tmp/gh-action'
WORKPATH=$GITHUB_WORKSPACE/$INPUT_PATH
# # Set path permision
# sudo -u builder cp -rfv $WORKPATH /tmp/gh-action
# cd /tmp/gh-action
# echo '::endgroup::'
cd $GITHUB_WORKSPACE/$INPUT_PATH
# Update checksums
if [[ $INPUT_UPDPKGSUMS == true ]]; then
echo '::group::Updating checksums on PKGBUILD'
sudo -u builder updpkgsums
echo '::endgroup::'
fi
# Generate .SRCINFO
if [[ $INPUT_SRCINFO == true ]]; then
echo '::group::Generating new .SRCINFO based on PKGBUILD'
sudo -u builder makepkg --printsrcinfo >.SRCINFO
echo '::endgroup::'
fi
# Validate with namcap
if [[ $INPUT_NAMCAP == true ]]; then
echo '::group::Validating PKGBUILD with namcap'
namcap -i PKGBUILD
echo '::endgroup::'
fi
# Run makepkg
if [[ -n "$INPUT_FLAGS" ]]; then
echo '::group::Running makepkg with flags'
sudo -u builder CARCH=$INPUT_CARCH makepkg $INPUT_FLAGS
echo '::endgroup::'
fi
# echo '::group::Copying files from /tmp/gh-action to $WORKPATH'
# cp -fv /tmp/gh-action/*.pkg.* $WORKPATH/
# echo '::endgroup::'