iris stopped at v0.5.10; the lint has been portal itself since 0.6.0, fetched from the portal release this site runs, as uhhm/questions does. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
42 lines
1.5 KiB
YAML
42 lines
1.5 KiB
YAML
name: Lint and reload
|
|
|
|
# Lint runs on PRs too - it's the status check branch protection
|
|
# requires before the development-commit automation's PRs may merge
|
|
# (merge_when_checks_succeed). The reload only ever fires on a push
|
|
# that actually landed on main.
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: bare
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
# The lint is portal itself (`portal lint`, since portal 0.6.0;
|
|
# iris is no longer released), at the version this site runs
|
|
# (PORTAL_RELEASE in deploy.yml).
|
|
- name: Lint questions
|
|
env:
|
|
PORTAL_RELEASE: v0.6.20
|
|
run: |
|
|
# The checkout is on a noexec mount for this runner; the cargo
|
|
# target dir is where it may run what it fetched.
|
|
bin="/var/local/cargo-target/portal-lint-$PORTAL_RELEASE"
|
|
[ -x "$bin" ] || { curl -sfL "${{ github.server_url }}/uhhm/portal/releases/download/$PORTAL_RELEASE/portal-x86_64-linux" -o "$bin" && chmod +x "$bin"; }
|
|
"$bin" lint --path questions
|
|
|
|
reload:
|
|
runs-on: bare
|
|
needs: lint
|
|
if: github.event_name == 'push'
|
|
steps:
|
|
# Tells every running portal instance to re-fetch and atomically
|
|
# swap in the new content - see content::watch_for_reload in the
|
|
# portal repo. Fire and forget: no reply expected, no payload
|
|
# needed (the subject alone is the whole message).
|
|
- name: Tell portal to reload content
|
|
run: nats pub portal.content.reload '' --server "nats://infra:${{ secrets.NATS_TOKEN }}@127.0.0.1:4222"
|