diff --git a/Dockerfile b/Dockerfile index e83c16e..6a18baa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/README.md b/README.md index 8c1a363..436fcad 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![GitHub Workflow Status](https://img.shields.io/github/workflow/status/hapakaien/archlinux-package-action/CI?label=CI&style=flat-square)](https://github.com/hapakaien/archlinux-package-action/actions) [![GitHub release (latest by date)](https://img.shields.io/github/v/release/hapakaien/archlinux-package-action?style=flat-square)](https://github.com/hapakaien/archlinux-package-action/releases) [![GitHub](https://img.shields.io/github/license/hapakaien/archlinux-package-action?style=flat-square)](./LICENSE) -This action allows running tools needed for creating Arch Linux (and AUR) package. +This action allows running tools needed for creating Arch Linux (and AUR) package. Here's what this action can do: - Update `pkgver`, `pkgrel`, or checksums on PKGBUILD file @@ -21,15 +21,16 @@ Here's what this action can do: Following inputs can be used as `step.with` keys -| Name | Type | Default | Required | Description | -|-------------------|-----------|-------------------------------|-----------|---------------------------------------| -| `path` | String | | `false` | Path where PKGBUILD is located. This path always located under $GITHUB_WORKSPACE | -| `pkgver` | String | | `false` | Update `pkgver` on your PKGBUILD | -| `pkgrel` | Integer | | `false` | Update `pkgrel` on your PKGBUILD | -| `updpkgsums` | Boolean | `false` | `false` | Update checksums on your PKGBUILD | -| `srcinfo` | Boolean | `false` | `false` | Generate new .SRCINFO | -| `namcap` | Boolean | `true` | `false` | Validate PKGBUILD | -| `flags` | String | `-cfs --noconfirm` | `false` | Flags after `makepkg` command. Leave this empty will disable this command. | +| Name | Type | Default | Required | Description | +| ------------ | ------- | ------------------ | -------- | -------------------------------------------------------------------------------- | +| `path` | String | | `false` | Path where PKGBUILD is located. This path always located under $GITHUB_WORKSPACE | +| `pkgver` | String | | `false` | Update `pkgver` on your PKGBUILD | +| `pkgrel` | Integer | | `false` | Update `pkgrel` on your PKGBUILD | +| `updpkgsums` | Boolean | `false` | `false` | Update checksums on your PKGBUILD | +| `srcinfo` | Boolean | `false` | `false` | Generate new .SRCINFO | +| `namcap` | Boolean | `true` | `false` | Validate PKGBUILD | +| `flags` | String | `-cfs --noconfirm` | `false` | Flags after `makepkg` command. Leave this empty will disable this command. | +| `aur` | Boolean | `false` | `false` | Resolve dependencies using paru | ### Examples diff --git a/action.yml b/action.yml index 780df7e..dcce652 100644 --- a/action.yml +++ b/action.yml @@ -35,6 +35,10 @@ inputs: description: 'Validate package with namcap' default: 'true' required: false + aur: + description: 'Resolve dependencies using paru' + default: 'false' + required: false runs: using: 'docker' @@ -47,3 +51,4 @@ runs: - ${{ inputs.srcinfo }} - ${{ inputs.flags }} - ${{ inputs.namcap }} + - ${{ inputs.aur }} diff --git a/entrypoint.sh b/entrypoint.sh index 0cc1502..160582d 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -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"