initial commit
This commit is contained in:
parent
343c33d366
commit
f63cb4d709
2 changed files with 126 additions and 2 deletions
51
README.md
51
README.md
|
@ -1,3 +1,50 @@
|
||||||
# makepkg
|
# `makepkg`-Action
|
||||||
|
|
||||||
|
This action builds Arch packages. It is meant to be run inside an `archlinux`
|
||||||
|
container, like the one we provide at
|
||||||
|
[aur/runner-image](https://git.michaelsasser.org/aur/runner-image), which comes
|
||||||
|
with all the necessary tools. Alternatively you could install the necessary
|
||||||
|
tools yourself before running this action.
|
||||||
|
|
||||||
|
## inputs
|
||||||
|
|
||||||
|
| Name | Default | Required | Description |
|
||||||
|
| ------------------------- | -------- | -------- | ------------------------------------------------ |
|
||||||
|
| `update_package_database` | `'true'` | No | Download fresh package databases before building |
|
||||||
|
| `update_checksum` | `'true'` | No | Update the checksum before building the package |
|
||||||
|
| `lint_pkgbuild` | `'true'` | No | Run namecap on the PKGBUILD |
|
||||||
|
| `install_package` | `'true'` | No | Install the package after it was built |
|
||||||
|
| `lint_package` | `'true'` | No | Run namecap on the resulting package |
|
||||||
|
|
||||||
|
## Example usage
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build & Lint
|
||||||
|
runs-on: ubuntu-latest-amd64
|
||||||
|
container:
|
||||||
|
image: "git.michaelsasser.org/aur/runner-image:latest"
|
||||||
|
credentials:
|
||||||
|
username: ${{ vars.USERNAME_ACTIONS }}
|
||||||
|
password: ${{ secrets.PERSONAL_ACCESS_TOKEN_ACTIONS }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: https://git.michaelsasser.org/actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Build Package
|
||||||
|
uses: https://git.michaelsasser.org/actions/makepkg@main
|
||||||
|
```
|
||||||
|
|
||||||
|
## Semantic Versioning and Branching Model
|
||||||
|
|
||||||
|
This action uses [SemVer](https://semver.org/) for its release cycle and
|
||||||
|
follows the
|
||||||
|
[GitHub Flow](https://docs.github.com/en/get-started/using-github/github-flow).
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
Copyright © 2020-2001 Michael Sasser <Info@MichaelSasser.org>. Released
|
||||||
|
under the MIT license.
|
||||||
|
|
||||||
Build Arch Packages
|
|
77
action.yml
Normal file
77
action.yml
Normal file
|
@ -0,0 +1,77 @@
|
||||||
|
---
|
||||||
|
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
|
Loading…
Add table
Reference in a new issue