1
0
Fork 1
mirror of https://github.com/heyhusen/archlinux-package-action.git synced 2025-04-02 01:25:04 +02:00

feat: 🎸 Add option to resolve deps using paru (from AUR)

This commit is contained in:
kamack38 2022-04-27 14:06:06 +02:00
parent b257397a15
commit c3e3ab0325
No known key found for this signature in database
GPG key ID: C4583B304CDA4CA0
3 changed files with 18 additions and 1 deletions

View file

@ -10,6 +10,10 @@ RUN useradd -m builder && \
WORKDIR /home/builder
USER builder
# Install paru
RUN git clone https://aur.archlinux.org/paru-bin.git
RUN cd paru-bin && makepkg -si --noconfirm
# Copy files
COPY LICENSE README.md /
COPY entrypoint.sh /entrypoint.sh

View file

@ -35,6 +35,10 @@ inputs:
description: 'Validate package with namcap'
default: 'true'
required: false
aur:
description: 'Resolve dependencies using AUR'
default: 'false'
required: false
runs:
using: 'docker'
@ -47,3 +51,4 @@ runs:
- ${{ inputs.srcinfo }}
- ${{ inputs.flags }}
- ${{ inputs.namcap }}
- ${{ inputs.aur }}

View file

@ -40,7 +40,7 @@ fi
# Generate .SRCINFO
if [[ $INPUT_SRCINFO == true ]]; then
echo "::group::Generating new .SRCINFO based on PKGBUILD"
makepkg --printsrcinfo > .SRCINFO
makepkg --printsrcinfo >.SRCINFO
git diff .SRCINFO
echo "::endgroup::"
fi
@ -52,6 +52,14 @@ if [[ $INPUT_NAMCAP == true ]]; then
echo "::endgroup::"
fi
# Install depends using paru from aur
if [[ -n $INPUT_AUR ]]; then
echo "::group::Installing depends using paru"
source PKGBUILD
paru -Syu --removemake --needed --noconfirm "${depends[@]}" "${makedepends[@]}"
echo "::endgroup::"
fi
# Run makepkg
if [[ -n $INPUT_FLAGS ]]; then
echo "::group::Running makepkg with flags"