arch-makepkg/action.yml
2024-12-27 11:25:43 +01:00

77 lines
1.8 KiB
YAML

---
name: makepkg
description: Build Arch Linux Packages.
author: Michael Sasser <info@michaelsasser.org>
branding:
icon: shield
color: blue
inputs:
update_package_database:
description: Download fresh package databases before building.
required: false
default: "true"
update_checksum:
description: Update the checksum before building the package.
required: false
default: "true"
lint_pkgbuild:
description: Run namecap on the PKGBUILD.
required: false
default: "true"
install_package:
description: Install the package after it was built.
required: false
default: "true"
lint_package:
description: Run namecap on the resulting package.
required: false
default: "true"
runs:
using: composite
steps:
- name: Update Package Database
if: inputs.update_package_database == 'true'
shell: bash
run: |
pacman --version
sudo pacman -Sy --noconfirm
- name: Update checksums
if: inputs.update_checksum == 'true'
shell: bash
run: |
updpkgsums --version
updpkgsums
- name: Download & Extract Packages
shell: bash
run: |
cat PKGBUILD
makepkg --version
makepkg -so --noconfirm --needed
ls -la src/
- name: Lint PKGBUILD
shell: bash
if: inputs.lint_pkgbuild == 'true'
run: |
namcap --version
namcap PKGBUILD
- name: Build
shell: bash
run: |
if [ ${{ inputs.install_package }} = 'true' ]; then
makepkg -si --skipchecksums --skippgpcheck --noconfirm --needed
else
makepkg -s --skipchecksums --skippgpcheck --noconfirm --needed
fi
ls -la
- name: Lint Package(s)
if: inputs.lint_package == 'true'
shell: bash
run: namcap *.pkg.tar.zst