Forgejo Actions composite action: upload CI reports to Argus (+ job summary, PR link comment)
  • Shell 85.2%
  • Python 14.8%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Gilles Fritz 24caada783
All checks were successful
ci / test (push) Successful in 13s
ci / release (push) Has been skipped
Send publish reports to Argus from the release job (#4)
Closes #3

Monitoring plan, phase 5 rollout, same as the pilots argus/backend#45 and argus/frontend#35.

## Changes (`.forgejo/workflows/ci.yml`)
- No collect step: a composite action has no build artifact or dependencies, the report carries the version and the release page. Numbered releases only (no devel draft here).
- The publish-release call (numbered release) gets `ARGUS_UPLOAD_TOKEN: ${{ secrets.ARGUS_UPLOAD_TOKEN }}`. A failed upload only warns, the release itself is unaffected.

Needs the repository secret `ARGUS_UPLOAD_TOKEN` (project upload token) before the next release; without it publish-release just skips the report.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_014BSmBtGWeFBD9z4mYm9SjA
Reviewed-on: #4
2026-10-30 09:55:26 +00:00
.forgejo/workflows Send publish reports to Argus from the release job (#4) 2026-10-30 09:55:26 +00:00
tests Send the CI run URL and actor with each upload (#2) 2026-10-25 21:58:15 +00:00
action.yml variant: fall back to a job-level ARGUS_VARIANT env var 2026-10-18 23:30:11 +02:00
lib.sh Fix CI: shellcheck false positives failing the test job 2026-10-18 23:38:12 +02:00
LICENSE Initial argus/upload-action composite action 2026-10-18 23:07:11 +02:00
pr-link.sh Initial argus/upload-action composite action 2026-10-18 23:07:11 +02:00
README.md Send the CI run URL and actor with each upload (#2) 2026-10-25 21:58:15 +00:00
renovate.json Configure Renovate (#1) 2026-10-19 05:44:14 +00:00
upload.sh Send the CI run URL and actor with each upload (#2) 2026-10-25 21:58:15 +00:00

argus/upload-action

Forgejo Actions composite action that uploads CI reports to Argus — replaces the upload-to-argus.sh + post-argus-link-comment.sh scripts that used to be copy-pasted into every repo.

For each run it:

  1. uploads every listed report (missing files are skipped, a failed upload fails the step after the others were tried);
  2. writes a job summary (Forgejo ≥ 17, runner ≥ 13.2) with one row per report and a link to the Argus page of the PR/branch;
  3. optionally posts — or updates in place — one PR comment linking to the PR's Argus page.

Usage

- name: Upload reports to Argus
  if: always()   # a failing run is exactly what Argus exists to show
  uses: https://git.stationmyr.net/argus/upload-action@v1
  with:
    token: ${{ secrets.ARGUS_UPLOAD_TOKEN }}
    reports: |
      junit junit.xml
      cobertura coverage.xml
      pylint pylint.json
      bandit bandit.json
    # optional:
    variant: node${{ matrix.node-version }}          # one per matrix cell
    pr-comment-token: ${{ secrets.PACKAGES_TOKEN }}  # PR link comment

variant falls back to an ARGUS_VARIANT env var set earlier in the job, for names an expression can't build:

- run: echo "ARGUS_VARIANT=py$(echo '${{ matrix.python-version }}' | tr -d .)" >> "$GITHUB_ENV"

reports: one report per line, <report_type> <file_path> [custom_type_name] (e.g. custom renovate-run.json renovate-run).

Input Required Default
token yes —
reports yes —
variant no ''
pr-comment-token no '' (no comment)
argus-url no https://reports.stationmyr.net
owner / repo no from GITHUB_REPOSITORY

Each upload also carries the run's page ($GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_NUMBER) and GITHUB_ACTOR, shown in Argus's event notifications. Nothing to configure; an Argus without events support ignores them.

Image requirements: sh and curl; jq too when pr-comment-token is set. Every ci-base variant has all three.

Why the repo is public

The runner clones uses: https://… actions anonymously. The repo holds no secret — tokens only come in through the inputs.

Versioning

Tags vX.Y.Z plus a moving major tag (v1). Callers use @v1; a breaking input change means a new major (v2).

Releasing is a manual run of the ci workflow with a version input (e.g. 1.2.0): once the tests pass it tags v1.2.0, creates its release with notes generated from the PRs, issues and commits since the previous tag (ci-base's release-notes/publish-release), then moves v1 to it — only if it's the highest v1.*, so a fix on an older line never moves @v1 back. A new major gets its own tag (v2) and leaves v1 alone.

Tests

sh tests/run.sh (python3, curl, jq) runs both scripts end to end against tests/fake_server.py; CI also runs sh -n and shellcheck.

License

GPLv3, like Argus.