Inital ver (port)
This commit is contained in:
53
.gitea/workflows/nightly.yml
Normal file
53
.gitea/workflows/nightly.yml
Normal file
@@ -0,0 +1,53 @@
|
||||
name: nightly-build
|
||||
|
||||
on:
|
||||
schedule:
|
||||
# 03:30 UTC every night
|
||||
- cron: "30 3 * * *"
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
only:
|
||||
description: "Space-separated package dirs to build (blank = all)"
|
||||
required: false
|
||||
default: ""
|
||||
replace:
|
||||
description: "Replace existing registry files on version clash"
|
||||
required: false
|
||||
default: "false"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: archlinux:latest
|
||||
# makepkg refuses to run as root; we create a build user below.
|
||||
options: --privileged
|
||||
steps:
|
||||
- name: Install toolchain
|
||||
run: |
|
||||
pacman -Syu --noconfirm --needed base-devel git python sudo
|
||||
|
||||
- name: Create build user
|
||||
run: |
|
||||
useradd -m -s /bin/bash builder
|
||||
echo "builder ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/builder
|
||||
chmod 0440 /etc/sudoers.d/builder
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Fix permissions
|
||||
run: chown -R builder:builder "$GITHUB_WORKSPACE"
|
||||
|
||||
- name: Build and publish
|
||||
env:
|
||||
AUTOPKG_REGISTRY_URL: ${{ github.server_url }}
|
||||
AUTOPKG_OWNER: ${{ github.repository_owner }}
|
||||
AUTOPKG_REPO: arch
|
||||
AUTOPKG_USER: ${{ github.actor }}
|
||||
AUTOPKG_TOKEN: ${{ secrets.PACKAGE_TOKEN }}
|
||||
AUTOPKG_REPLACE: ${{ github.event.inputs.replace }}
|
||||
ONLY: ${{ github.event.inputs.only }}
|
||||
run: |
|
||||
sudo -E -u builder \
|
||||
python3 autopackage.py --keep-going ${ONLY:+--only $ONLY}
|
||||
Reference in New Issue
Block a user