Skip to content

UID2-7445: automate shared-actions releases (dispatch-only)#256

Merged
swibi-ttd merged 12 commits into
mainfrom
swi-UID2-7445-automate-release
Jul 14, 2026
Merged

UID2-7445: automate shared-actions releases (dispatch-only)#256
swibi-ttd merged 12 commits into
mainfrom
swi-UID2-7445-automate-release

Conversation

@swibi-ttd

@swibi-ttd swibi-ttd commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Automates uid2-shared-actions releases so they can only come from reviewed (main) code — closing the tag/release path in UID2-7445. Pairs with the tag ruleset in UnifiedID2/uid2-okta-configuration#232.

  • publish-shared-actions.yaml (new): dispatch-only, runs in the release environment (main-pinned, holds the UID2SourceAdmin PAT). Computes next version, creates the tag + release, moves the major-version tag — all as UID2SourceAdmin. Replaces manual UI releases.
  • update-major-version-tag: optional github_token input so the move can run under the PAT (defaults to GITHUB_TOKEN — backward compatible; used only by this repo).
  • Removed update-major-version-tags.yaml: the release-triggered mover, now folded into the new workflow.

🤖 Generated with Claude Code

swibi-ttd and others added 4 commits July 13, 2026 11:17
Add publish-shared-actions.yaml: dispatch-only, main-pinned via the
release environment, cutting the release and moving the major-version
tag as UID2SourceAdmin. Add a github_token input to update-major-version-tag
so the move can run under that PAT (defaults to GITHUB_TOKEN, backward
compatible). Remove the release-triggered update-major-version-tags.yaml,
now folded into the new workflow.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
update-major-version-tag's regex requires a leading 'v'; the move step
was passing the bare number (3.99), which silently no-op'd the v3 move.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
mikepenz tag auto-detection mis-sorts shared-actions' non-sequential tags
(v3.7 vs v3.70); resolve the previous published release explicitly so a
release batching several merges gets an accurate changelog.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
shared-actions ships no installable artifact, so mikepenz's per-platform
install templating brings no value here. Built-in generate_release_notes
matches the repo's historical UI-created notes format, drops a third-party
action from the release path, and sidesteps mikepenz's semver tag filter
(our v3.x tags are two-component, not valid semver). Removes the mikepenz
and resolve-previous-tag steps.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@swibi-ttd swibi-ttd left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adversarial self-review (6 critics + defender pass, 90 raised → 13 sustained). Inline comments below cover the code-anchored findings. Ticket-level items with no code anchor:

  • AC2 evidence: neither PR links a successful end-to-end dispatch run of this workflow. That run also exercises the ruleset-bypass direction and the composite action's new token branch — sequence it before the ruleset activates (see okta-configuration PR #232 rollout comment).
  • AC1 scope: this covers 1 of 4 ticket-named repos; uid2-operator (release assets feed prod directly) is untouched. Needs tracked follow-up tickets, and the PR body's "closing the tag/release path" claim should be scoped to shared-actions.
  • AC3: residual gaps (repo-admin ruleset editability, fleet-PAT reach, releases-on-existing-tags for operator) need explicit handoff to UID2-7428 before ticket closure.
  • AC4: Confluence "How to Build and Deploy" update not yet evidenced — doubly needed since the UI release path's behavior changes for all admins.

Comment thread .github/workflows/publish-shared-actions.yaml Outdated
Comment thread .github/workflows/publish-shared-actions.yaml
Comment thread .github/workflows/publish-shared-actions.yaml Outdated
Comment thread .github/workflows/publish-shared-actions.yaml Outdated
Comment thread .github/workflows/publish-shared-actions.yaml
swibi-ttd and others added 5 commits July 13, 2026 12:59
- correct the header: the v* ruleset is bypassed by release automation AND
  uid-admins (JITA), not the PAT alone
- add a concurrency group so two dispatches can't race the version compute
- record why we use built-in notes over the canonical shared_create_releases

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Same behaviour as the string form, but spells out that a release must never
be cancelled mid-flight (partial tag/release state).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The tag exists before the release step (created via github-script under the
PAT), so creating the release needs only contents: write — use the ephemeral
GITHUB_TOKEN there and confine the PAT to the two first-party tag-write steps.
Avoids handing the fleet's most powerful credential to a third-party action.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Comment thread .github/workflows/publish-shared-actions.yaml
Comment thread .github/workflows/publish-shared-actions.yaml
swibi-ttd and others added 3 commits July 13, 2026 19:21
Previously a version not matching vMAJOR.MINOR logged and exited 0, silently
skipping the major-tag move. Since v3 feeds ~200 @V3 consumers, make it
core.setFailed instead — closes the silent path at the source for all callers.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace the two near-identical seds with param expansion (fewer moving parts,
no drift between major/minor extraction) and fail loud if no vMAJOR.MINOR tag
exists instead of silently producing v.1.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Under -eo pipefail a no-match grep fails the assignment and errexit ends the
step before the guard could run — so the guard was dead. errexit already
prevents a silent v.1; document that instead of keeping dead code.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@swibi-ttd
swibi-ttd requested a review from BehnamMozafari July 13, 2026 23:37
@swibi-ttd
swibi-ttd merged commit a75bc46 into main Jul 14, 2026
5 checks passed
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.

2 participants