CI: lint on pull requests too, reload only on pushes to main
Lint and reload / lint (push) Successful in 2s
Lint and reload / reload (push) Successful in 0s

A development-proposal PR previously got no check at all (the workflow
only fired on push to main) - so branch protection's required status
check, the thing that makes the automation's merge_when_checks_succeed
an actual lint gate, had nothing to require. Lint now runs on both
events; the content-reload NATS publish stays push-only.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Bendik Aagaard Lynghaug
2026-08-12 22:21:27 +02:00
co-authored by Claude Sonnet 5
parent 8d10e99726
commit bf506a83f2
+11 -1
View File
@@ -1,11 +1,16 @@
name: Lint and reload 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: on:
push: push:
branches: [main] branches: [main]
pull_request:
jobs: jobs:
lint-and-reload: lint:
runs-on: bare runs-on: bare
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@@ -18,6 +23,11 @@ jobs:
- name: Lint questions - name: Lint questions
run: /srv/app/uhhm-portal/current/question_lint --path questions run: /srv/app/uhhm-portal/current/question_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 # Tells every running portal instance to re-fetch and atomically
# swap in the new content - see content::watch_for_reload in the # swap in the new content - see content::watch_for_reload in the
# portal repo. Fire and forget: no reply expected, no payload # portal repo. Fire and forget: no reply expected, no payload