Build package #195
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build package | |
on: | |
workflow_dispatch: | |
inputs: | |
pkgname: | |
description: "Package to build" | |
required: true | |
nodeps: | |
description: "Skip dependency checks (use 1 to disable dependency checks)" | |
required: false | |
repository_dispatch: | |
types: [build-package] | |
permissions: | |
id-token: write | |
contents: read | |
attestations: write | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
path: buildsrc | |
- name: Prepare build environment | |
run: | | |
sudo chown -R 1000 buildsrc | |
sudo chown -R $(id -u) buildsrc/.git | |
sudo install -d -o 1000 -g users repo | |
- name: Use geschenkerbauer to build packages (workflow dispatch) | |
uses: mutantmonkey/geschenkerbauer/action@1fe2fb48cebc48e8e319cceba53b48ae43aacd49 | |
env: | |
GNUPG_PUBKEYRING: ${{ github.workspace }}/buildsrc/keyring.asc | |
PACKAGER: geschenkerbauer on github <[email protected]> | |
with: | |
packages: ${{ github.event.inputs.pkgname }} | |
nodeps: ${{ github.event.inputs.nodeps }} | |
if: ${{ github.event_name == 'workflow_dispatch' }} | |
- name: Use geschenkerbauer to build packages (repository dispatch) | |
uses: mutantmonkey/geschenkerbauer/action@1fe2fb48cebc48e8e319cceba53b48ae43aacd49 | |
env: | |
GNUPG_PUBKEYRING: ${{ github.workspace }}/buildsrc/keyring.asc | |
PACKAGER: geschenkerbauer on github <[email protected]> | |
with: | |
packages: ${{ github.event.client_payload.pkgname }} | |
nodeps: ${{ github.event.client_payload.nodeps }} | |
if: ${{ github.event_name != 'workflow_dispatch' }} | |
- name: Replace forbidden colon character in package filenames | |
run: | | |
for f in $(find . -iname '*:*'); do | |
sudo mv "$f" "${f/:/__3A__}" | |
done || exit 0 | |
working-directory: ./repo | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: output | |
path: repo | |
- name: Generate artifact attestation | |
uses: actions/attest-build-provenance@v1 | |
with: | |
subject-path: 'repo/*' |