Skip to content

Commit

Permalink
feat: custom makepkg.conf path
Browse files Browse the repository at this point in the history
  • Loading branch information
Pinghigh authored Sep 9, 2023
1 parent 862e6ea commit 8500ede
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ inputs:
description: "Additional arguments to pass to makepkg."
required: false
default: ""
makepkgProfilePath:
description: "path of makepkg.conf"
required: false
default: ""
outputs:
pkgfile0:
description: "Filename of the first generated package archive. Usually only one."
Expand Down
8 changes: 7 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,13 @@ chown -R builder .
# INPUT_MAKEPKGARGS is intentionally unquoted to allow arg splitting
# shellcheck disable=SC2086
pacman -S --noconfirm --needed paru
sudo -H -u builder updpkgsums

if test -z "${INPUT_MAKEPKGPROFILEPATH}";then
echo "Didn't provide makepkg profile path. Skipped."
else
sudo -H -u builder install -D /etc/makepkg.conf ~/.config/pacman/makepkg.conf # 怕出权限问题所以先传统方式安装
sudo -H -u cat ${INPUT_MAKEPKGPROFILEPATH} > ~/.config/pacman/makepkg.conf
fi

sudo -H -u builder paru -U --noconfirm --mflags "${INPUT_MAKEPKGARGS:-}"
# Get array of packages to be built
Expand Down

0 comments on commit 8500ede

Please sign in to comment.