Skip to content

ci(deploy): post a legacy "CI" commit status after deploy#12

Merged
Musiker15 merged 1 commit into
mainfrom
ci/post-commit-status
May 25, 2026
Merged

ci(deploy): post a legacy "CI" commit status after deploy#12
Musiker15 merged 1 commit into
mainfrom
ci/post-commit-status

Conversation

@Musiker15
Copy link
Copy Markdown
Member

Summary

PR-management UIs that read the older Statuses API show every merge commit on main as stuck-on-pending. The Check Runs (Build & Deploy / CodeQL / Secret Scanning) are all green — but nothing posts a classic commit status, so:

gh api repos/MSK-Scripts/documentation/commits/main/status -q .state
# → "pending"

even though:

gh api repos/MSK-Scripts/documentation/commits/main/check-runs -q '.check_runs[] | "\(.conclusion)\t\(.name)"'
# → success    Build & Deploy
# → success    Analyze (javascript-typescript)
# → success    Scan for leaked secrets

Change

After the deploy step, post context: CI to the Statuses API with state derived from job.status. Runs with if: always() so a failed deploy also gets a status posted (red instead of leaving it stuck on pending forever).

Adds statuses: write to the workflow permissions (was contents: read only).

Why only this repo

Only the documentation repo is doing this — mskanban has the same combined-status pending but the UI in question only surfaces this for documentation PRs (see MSKanban PR #56 conversation). If we ever hit the same with mskanban, this is a copy-paste fix.

Test plan

  • Workflow file is syntactically valid YAML
  • After merge: the Deploy run posts a CI status; gh api repos/.../commits/main/status -q .state flips from pending to success
  • PR-management UI shows green CI on this PR's merge commit

PR-management UIs that read the older GitHub *Statuses* API (rather
than the newer *Check Runs* API) currently show every merge commit
on main as stuck-on-`pending`. The check-runs themselves are all
green — Build & Deploy, CodeQL, Secret Scanning — but nothing
posts a classic commit status, so the combined `state` reported by
`/repos/.../commits/:sha/status` is `pending`.

This step calls the Statuses API at the end of the deploy job to
post `context: CI, state: success|failure` based on `job.status`.
Runs with `if: always()` so a failed deploy also gets a status
posted (red instead of leaving it pending forever).

Adds `statuses: write` to the workflow permissions (was
`contents: read` only). No other side-effects.

Signed-off-by: Musiker15 <info@musiker15.de>
@github-actions
Copy link
Copy Markdown

⚠️ Deprecation Warning: The deny-licenses option is deprecated for possible removal in the next major release. For more information, see issue 997.

Dependency Review

The following issues were found:
  • ✅ 0 vulnerable package(s)
  • ✅ 0 package(s) with incompatible licenses
  • ✅ 0 package(s) with invalid SPDX license definitions
  • ⚠️ 1 package(s) with unknown licenses.
See the Details below.

License Issues

.github/workflows/deploy.yml

PackageVersionLicenseIssue Type
actions/github-script7.*.*NullUnknown License
Denied Licenses: GPL-2.0, GPL-3.0

OpenSSF Scorecard

PackageVersionScoreDetails
actions/actions/github-script 7.*.* 🟢 7.8
Details
CheckScoreReason
Maintained🟢 1021 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Binary-Artifacts🟢 10no binaries found in the repo
Packaging⚠️ -1packaging workflow not detected
Code-Review🟢 10all changesets reviewed
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Token-Permissions🟢 9detected GitHub workflow tokens with excessive permissions
Pinned-Dependencies⚠️ 1dependency not pinned by hash detected -- score normalized to 1
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Security-Policy🟢 9security policy file detected
SAST🟢 10SAST tool is run on all commits
Branch-Protection🟢 6branch protection is not maximal on development and all release branches

Scanned Files

  • .github/workflows/deploy.yml

@Musiker15 Musiker15 merged commit 94b53ca into main May 25, 2026
4 checks passed
@Musiker15 Musiker15 deleted the ci/post-commit-status branch May 25, 2026 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant