feat: quarantine upstream update candidates

This commit is contained in:
Rasyidan Akbar F. 2026-07-14 20:36:58 +07:00
commit 5b0336a493
15 changed files with 660 additions and 230 deletions

View file

@ -19,6 +19,10 @@ jobs:
run: find . -name '*.nix' -not -path './_*' | xargs nix run nixpkgs#nixfmt-rfc-style -- --check
- name: Lint (statix)
run: nix run nixpkgs#statix -- check .
- name: Test update impact reporter
run: python3 -m unittest tests/test_render_update_report.py
- name: Test updater helpers
run: bash tests/update-common.sh
check:
needs: lint

32
.github/workflows/nightly-ci.yml vendored Normal file
View file

@ -0,0 +1,32 @@
name: Nightly Candidate
on:
pull_request:
branches: [main]
permissions:
contents: read
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Detect nightly pin changes
id: nightly
env:
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: |
if git diff --quiet "$BASE_SHA" "$HEAD_SHA" -- nightly.nix; then
echo "changed=false" >>"$GITHUB_OUTPUT"
else
echo "changed=true" >>"$GITHUB_OUTPUT"
fi
- if: steps.nightly.outputs.changed == 'true'
uses: DeterminateSystems/nix-installer-action@v13
- name: Build nightly compatibility suite
if: steps.nightly.outputs.changed == 'true'
run: nix build .#legacyPackages.x86_64-linux.nightlyChecks.all --accept-flake-config

View file

@ -6,8 +6,13 @@ on:
- cron: "0 4 * * *"
workflow_dispatch: {}
concurrency:
group: hermes-agent-nightly-candidate
cancel-in-progress: true
permissions:
contents: write
pull-requests: write
jobs:
update:
@ -21,10 +26,36 @@ jobs:
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v13
- name: Require PR automation token
env:
HERMES_UPDATE_TOKEN: ${{ secrets.HERMES_UPDATE_TOKEN }}
run: |
if [[ -z "$HERMES_UPDATE_TOKEN" ]]; then
echo "Configure HERMES_UPDATE_TOKEN so candidate PRs receive required CI checks." >&2
exit 1
fi
- name: Run nightly updater
id: update
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HERMES_UPDATE_REPORT: ${{ runner.temp }}/hermes-nightly-update.md
run: |
git config user.name "nix-hermes-agent-bot"
git config user.email "bot@nix-hermes-agent.local"
scripts/update-nightly.sh
- name: Open or update candidate PR
if: steps.update.outputs.update_available == 'true'
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.HERMES_UPDATE_TOKEN }}
branch: automation/hermes-agent-nightly-candidate
delete-branch: true
commit-message: "chore: update Hermes Agent nightly candidate"
title: "chore: update Hermes Agent nightly candidate"
body-path: ${{ runner.temp }}/hermes-nightly-update.md
- name: Mark incompatible candidate
if: steps.update.outputs.update_available == 'true' && steps.update.outputs.compatible != 'true'
run: |
echo "The candidate PR was created, but nightly validation failed." >&2
exit 1

View file

@ -2,12 +2,17 @@ name: Update Hermes Agent Pins
on:
schedule:
# Check every 6 hours — hermes-agent doesn't release as often as openclaw
- cron: "15 */6 * * *"
# Stable releases are infrequent; daily discovery avoids needless churn.
- cron: "15 4 * * *"
workflow_dispatch: {}
concurrency:
group: hermes-agent-stable-candidate
cancel-in-progress: true
permissions:
contents: write
pull-requests: write
jobs:
update:
@ -21,10 +26,36 @@ jobs:
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v13
- name: Require PR automation token
env:
HERMES_UPDATE_TOKEN: ${{ secrets.HERMES_UPDATE_TOKEN }}
run: |
if [[ -z "$HERMES_UPDATE_TOKEN" ]]; then
echo "Configure HERMES_UPDATE_TOKEN so candidate PRs receive required CI checks." >&2
exit 1
fi
- name: Run updater
id: update
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HERMES_UPDATE_REPORT: ${{ runner.temp }}/hermes-stable-update.md
run: |
git config user.name "nix-hermes-agent-bot"
git config user.email "bot@nix-hermes-agent.local"
scripts/update-pins.sh
- name: Open or update candidate PR
if: steps.update.outputs.update_available == 'true'
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.HERMES_UPDATE_TOKEN }}
branch: automation/hermes-agent-stable-candidate
delete-branch: true
commit-message: "chore: update Hermes Agent stable candidate"
title: "chore: update Hermes Agent stable candidate"
body-path: ${{ runner.temp }}/hermes-stable-update.md
- name: Mark incompatible candidate
if: steps.update.outputs.update_available == 'true' && steps.update.outputs.compatible != 'true'
run: |
echo "The candidate PR was created, but compatibility validation failed." >&2
exit 1