diff options
| author | Egor Tensin <egor@tensin.name> | 2026-06-20 17:15:20 +0200 |
|---|---|---|
| committer | Egor Tensin <egor@tensin.name> | 2026-06-20 17:21:07 +0200 |
| commit | f39373122ee8c8e19dc8a9767bcdd73c03fe0a4d (patch) | |
| tree | 431d3e4381184ecf4872b053bfee574c0a6c345d /.github/workflows/ci.yml | |
| parent | workflows/ci: allow linting to fail on non-master branches (diff) | |
| download | linux-status-2.4.7.tar.gz linux-status-2.4.7.zip | |
workflows/ci: add a job to publish to AURv2.4.7
Diffstat (limited to '.github/workflows/ci.yml')
| -rw-r--r-- | .github/workflows/ci.yml | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8b4e3b0..b29a119 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,3 +36,56 @@ jobs: run: sudo ./test/test.sh - name: Run tests run: ./test/test.sh + + aur: + name: Publish to AUR + needs: + - lint + - test + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/') + container: + image: archlinux:base-devel + steps: + # This step must be done before actions/checkout. From the latter's + # output: + # + # To create a local Git repository instead, add Git 2.18 or higher to the PATH + # + - name: Install dependencies + run: | + pacman -Syu --noconfirm git openssh + + - name: Checkout + uses: actions/checkout@v6 + with: + ref: aur + token: '${{ secrets.GH_TOKEN }}' + + # makepkg for no reason hard-forbids running as root. Kill me now. + - name: Add builder user + run: | + useradd -m -s /bin/bash builder + chown -R builder:builder -- "$GITHUB_WORKSPACE" + + - name: Configure SSH + run: | + mkdir -p /home/builder/.ssh/ + cat > /home/builder/.ssh/config <<'EOF' + StrictHostKeyChecking no + EOF + cat > /home/builder/.ssh/id_ed25519 <<'EOF' + ${{ secrets.SSH_KEY }} + EOF + chown -R builder:builder /home/builder/.ssh + chmod 0600 /home/builder/.ssh/id_ed25519 + + - name: Configure git + run: | + # See https://github.com/actions/checkout#push-a-commit-using-the-built-in-token + runuser -u builder -- git -C "$GITHUB_WORKSPACE" config user.name "github-actions[bot]" + runuser -u builder -- git -C "$GITHUB_WORKSPACE" config user.email "41898282+github-actions[bot]@users.noreply.github.com" + + - name: Run maintenance + run: | + runuser -u builder -- make -C "$GITHUB_WORKSPACE" maintenance |
