custom nspawn script for arch build
This commit is contained in:
@@ -1,21 +0,0 @@
|
|||||||
---
|
|
||||||
name: build-arch-package
|
|
||||||
description: Build an Arch Linux package
|
|
||||||
inputs:
|
|
||||||
PKGBUILD:
|
|
||||||
description: PKGBUILD path
|
|
||||||
required: true
|
|
||||||
OUTDIR:
|
|
||||||
description: Output directory to store the built package (relative to $HOME)
|
|
||||||
required: false
|
|
||||||
default: $HOME/arch-packages
|
|
||||||
BUILD_SCRIPT:
|
|
||||||
description: Pacman configuration file used
|
|
||||||
required: false
|
|
||||||
default: extra-x86_64-build
|
|
||||||
branding:
|
|
||||||
color: blue
|
|
||||||
icon: archive
|
|
||||||
runs:
|
|
||||||
using: node16
|
|
||||||
main: index.js
|
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# https://gitlab.archlinux.org/archlinux/devtools/-/merge_requests/197
|
||||||
|
|
||||||
|
args=("$@")
|
||||||
|
has_keep_unit=0
|
||||||
|
|
||||||
|
for arg in "${args[@]}"; do
|
||||||
|
if [[ "$arg" == "--keep-unit" ]]; then
|
||||||
|
has_keep_unit=1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if ! (( has_keep_unit )); then
|
||||||
|
args=("--keep-unit" "${args[@]}")
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec /usr/bin/systemd-nspawn "${args[@]}"
|
||||||
@@ -88,6 +88,7 @@ jobs:
|
|||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Set proper repository url in PKGBUILD
|
- name: Set proper repository url in PKGBUILD
|
||||||
run: sed -i "s|%URL%|${{ github.server_url }}/${{ github.repository }}|" $GITHUB_WORKSPACE/tools/distro/arch/git/PKGBUILD
|
run: sed -i "s|%URL%|${{ github.server_url }}/${{ github.repository }}|" $GITHUB_WORKSPACE/tools/distro/arch/git/PKGBUILD
|
||||||
|
- run: echo "$GITHUB_WORKSPACE/.github/bin" >> "$GITHUB_PATH"
|
||||||
- name: Build Arch Linux package
|
- name: Build Arch Linux package
|
||||||
uses: FFY00/build-arch-package@v1
|
uses: FFY00/build-arch-package@v1
|
||||||
with:
|
with:
|
||||||
|
|||||||
Reference in New Issue
Block a user