Repository navigation
Run Self-check nightly, and keep actionlint off the Checks API outside a PR - #80
Merged
Merged
Conversation
…e a PR Self-check now also runs on a schedule (05:45 UTC daily) and on workflow_dispatch, so a main that goes red without a push is found the next morning. The actionlint step's reviewdog reporter, github-pr-check, takes the owner and repo from the event payload. A schedule payload carries neither, so the nightly run would fail on a clean tree with "POST repos///check-runs: 404" (reviewdog/reviewdog#832, #1263). Outside a pull request the step now uses the github-annotations reporter, which makes no API call and writes the same annotations the check-run reporter falls back to under this workflow's read-only token. Pull request runs keep github-pr-check, so what a pull request checks is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Self-check now also runs nightly at 05:45 UTC and on
workflow_dispatch, so a main that goes red without a push (a runner image, a pinned action, a date in a test) is found the next morning.pushandpull_requestare unchanged, and so are the job names (actionlint,scripts) and everything a pull request run checks.on:gainsschedule: - cron: "45 5 * * *"andworkflow_dispatch:. We picked minute 45 because GitHub delays scheduled runs at high load, and the start of every hour is one of those times.actionlintstep. Its reviewdog reporter,github-pr-check, takes the owner and repo from the event payload. Aschedulepayload carries neither, so the nightly run would fail on a clean tree withPOST https://api.github.com/repos///check-runs: 404(Github-Check gives POST 404 error when used inside a cron job reviewdog/reviewdog#832 and #1263, both still open; v0.21.0, the version this action's image pins, still reads them only from the payload). Outside a pull request the step now setsreporter: github-annotations. That reporter makes no API call and writes the findings to the log as::errorannotations. Under this workflow'scontents: readtoken, the check-run reporter already falls back to those same annotations after its check-run request is refused with a 403. Pull request runs keepgithub-pr-check.scriptsneeds no guard.node --testreads only the checkout (git ls-files) and temporary repositories. It already passes on push runs to main, and a scheduled or dispatched run checks out the same thing.How it was checked
Dispatch on this branch, green: https://github.com/cosyte/.github/actions/runs/39357698783 (
workflow_dispatch, head6985d41). Both jobs passed. The actionlint step ran withreporter: github-annotations, andscriptsran 1031 tests with 0 failures.The schedule case, reproduced locally. A dispatch payload includes
repository, so a dispatch run cannot show the schedule failure. We ran the reviewdog v0.21.0 release binary (checksum verified) with the action's own flags against a stub API that answers like acontents: readtoken (403 on creating a check run, 404 on any other path), with event payloads for push, dispatch and schedule:github-pr-checkgithub-annotationsPOST /repos///check-runs: 404Local gate:
actionlint1.7.12 with shellcheck 0.11.0 over every workflow, exit 0.node --test "test/*.test.mjs"on Node 24.22.0: 1031 pass, 0 fail.node scripts/check-no-emdash.mjs: OK on the tree and on the diff.Found while doing this, not changed here
fail_on_error: truedoes not fail the job. The action passes-fail-level=none(its input default) as well as-fail-on-error=true. In reviewdog v0.21.0 an explicitnoneis not the unset default, sofailLevel()returnsnoneand a finding exits 0 on every event. The local run above shows this: a fake actionlint finding exits 0 with every reporter and payload. Findings are annotated, but theactionlintcheck stays green. Settingfail_level: errorwould make it gate. That changes what a pull request run checks, so it belongs in its own PR.ci.yml'sactionlintjob has the same reporter. It is on by default (run-actionlint: true), and a caller whose CI runs onschedulewill hit the samerepos///check-runs: 404on that job.ci.ymlis out of scope for this PR, so we have not changed it.Checklist
node --test, no-emdash). This repo has nopackage.json..changeset/directory and noCHANGELOG.mdhere: nothing to record.Harness-Task: 49
🤖 Generated with Claude Code