summaryrefslogtreecommitdiffstatshomepage
path: root/.github
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2026-06-20 15:47:05 +0000
committerEgor Tensin <egor@tensin.name>2026-06-20 15:47:05 +0000
commit49f133f80227f73a8334a9bdd1065db5010f0da2 (patch)
tree4ad9343eb4fa5fd8159431f43dcd79f30e90bc28 /.github
parentMerge pull request #4 from egor-tensin/dependabot/github_actions/debian/actio... (diff)
parentworkflows/ci: add a job to publish to AUR (diff)
downloadlinux-status-49f133f80227f73a8334a9bdd1065db5010f0da2.tar.gz
linux-status-49f133f80227f73a8334a9bdd1065db5010f0da2.zip
Merge tag 'v2.4.7' into debian
Diffstat (limited to '.github')
-rw-r--r--.github/dependabot.yml5
-rw-r--r--.github/workflows/ci.yml67
2 files changed, 72 insertions, 0 deletions
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index ca79ca5..e65fe41 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -4,3 +4,8 @@ updates:
directory: /
schedule:
interval: weekly
+ - package-ecosystem: github-actions
+ directory: /
+ schedule:
+ interval: weekly
+ target-branch: debian
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 0da892b..b29a119 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -5,6 +5,20 @@ on:
workflow_dispatch:
jobs:
+ lint:
+ runs-on: ubuntu-latest
+ name: Linting
+ continue-on-error: "${{ github.ref != 'refs/heads/master' }}"
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v7
+ - name: Set up Python
+ uses: actions/setup-python@v6
+ with:
+ python-version: '3.x'
+ - name: Run black
+ uses: psf/black@stable
+
test:
strategy:
matrix:
@@ -22,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