Files
euri-packages/.github/workflows/build.yml
T

66 lines
1.4 KiB
YAML

name: Build Packages
on:
push:
branches: [master]
workflow_dispatch:
schedule:
- cron: "0 0 * * 1"
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
container:
image: archlinux:latest
steps:
- uses: actions/checkout@v4
- name: Install deps
run: |
pacman -Syu --noconfirm --needed \
python-yaml \
git \
sudo \
base-devel \
debugedit
- name: Create builder user
run: |
useradd -m builder
echo "builder ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
- name: Build packages
run: python build-packages.py
- name: Set up repo
run: |
mkdir -p repo
cp /tmp/pkgout/*.pkg.tar.zst repo/
cd repo
repo-add antergos-pkgs.db.tar.gz *.pkg.tar.zst
- name: Generate package list
run: |
python -c "
import json, os, glob
pkgs = []
for f in glob.glob('/tmp/pkgout/*.pkg.tar.zst'):
name = os.path.basename(f)
size = os.path.getsize(f)
pkgs.append({'name': name, 'size': size})
with open('repo/pkglist.json', 'w') as fp:
json.dump(pkgs, fp, indent=2)
fp.write('\n')
"
- name: Deploy to Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./repo
keep_files: false