Commit Graph

22 Commits

Author SHA1 Message Date
Hugh Hackman 3b734dfa69 fix: add pnpm setup fallback when packageManager field is absent
The release job used pnpm/action-setup@v5 without a version input,
which requires a packageManager field in package.json. Repos that
don't have this field fail at Setup pnpm, blocking all releases.

Mirror the resilient two-step pattern already used in plugin-ci.yaml:
- If packageManager is present: use Corepack (respects pinned version)
- If absent: fall back to pnpm/action-setup@v5 with version: latest

Fixes the systemic v1.0.0 release failures across kube-vip, sealed-secrets,
tns-csi, and rook (PRI-866).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 22:25:13 +00:00
Hugh Hackman e21ab550e4 ci: upgrade GitHub Actions to Node.js 24-compatible versions
Update shared workflow action versions ahead of the June 2, 2026 deadline
when GitHub forces all actions from Node.js 20 to Node.js 24:

- actions/setup-node@v4 → @v6
- actions/cache@v4 → @v5
- pnpm/action-setup@v4 → @v5
- actions/create-github-app-token@v1 → @v3

Affects: plugin-ci.yaml, plugin-release.yaml, ci-health-check.yaml

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-24 16:10:18 +00:00
Hugh Hackman ca5ab75f6b ci: remove version: latest from pnpm setup in plugin-release
pnpm/action-setup@v4 errors with ERR_PNPM_BAD_PM_VERSION when both
`version` (in the workflow) and `packageManager` (in package.json) are
specified. Remove the hardcoded `version: latest` from plugin-release
so that repos can pin their pnpm version via the packageManager field
in package.json.

When packageManager is absent the action falls back to latest (same
prior behavior). When packageManager is set it is used exclusively,
which prevents silent version drift.

The plugin-ci.yaml change is handled separately in PR #54.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-22 05:09:31 +00:00
Hugh Hackman a62d4181ee ci: add pnpm detection to plugin-release workflow
Mirrors the pnpm-detection logic from plugin-ci.yaml. When a repo has
pnpm-lock.yaml, the release job now: sets up pnpm, caches with pnpm,
runs pnpm install --frozen-lockfile, and commits pnpm-lock.yaml (not
package-lock.json) in the release branch.

Fixes the CI/release divergence where headlamp-polaris-plugin's CI used
pnpm strict hoisting but releases installed with npm, allowing dependency
resolution differences to reach production.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-22 04:40:27 +00:00
Hugh Hackman f564499a79 fix: use printf to avoid multi-line YAML literal block break
The multi-line --body string had cc @cpfarhood at column 0, which
terminated the YAML literal block scalar prematurely and caused
actionlint to reject the workflow file. Use printf to construct
the body string without embedding a literal newline in the YAML.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-21 23:09:49 +00:00
github-actions[bot] 494a8051af fix: add cc @cpfarhood to release PR body per org policy
All PRs must include cc @cpfarhood. The automated release PR
body generated by plugin-release.yaml was missing this.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-21 22:57:47 +00:00
privilegedescalation-engineer[bot] 3d7e7d1dff fix: skip release gracefully when RELEASE_APP_ID is not configured
Adds a check-secrets job that runs before any expensive work. When
RELEASE_APP_ID is empty (org secret not yet set, tracked in PRI-380),
the workflow exits cleanly with a notice instead of running the full
build and failing at the GitHub App token step.

Previously this left dangling state: a pushed tag, a GitHub Release,
and a release branch — but no version-bump PR. Now the workflow skips
all of that and exits clean.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-21 00:31:37 +00:00
privilegedescalation-ceo[bot] 507e8633eb fix: skip duplicate release gracefully when tag already exists
* fix: skip duplicate release gracefully when tag already exists

Replace inline exit-1 tag check with a dedicated check-tag job that uses
the GitHub API. When the tag already exists, check-tag outputs skip=true
and the release job is conditionally skipped via if: condition. Workflow
now reports success (not failure) for duplicate release attempts.

Fixes #30 (partial) — resolves the tag-already-exists failure mode.

Co-Authored-By: Hugh Hackman <hugh@privilegedescalation.io>

* fix: use curl instead of gh CLI in check-tag job for portability

gh CLI may not be pre-installed on ARC runners. curl is always available
in container images. Avoids potential startup failure if gh binary is absent.

Co-Authored-By: Paperclip <noreply@paperclip.ing>

* fix: drop -f flag from curl in check-tag to avoid exit on 404

With -f, curl exits non-zero when the tag does not exist (404). In GitHub
Actions bash steps (set -e), this could cause the step to fail before the
if-block runs. Using -s alone: curl always exits 0 on network success,
HTTP_CODE is captured correctly for both 200 and 404 cases.

Co-Authored-By: Paperclip <noreply@paperclip.ing>

---------

Co-authored-by: Hugh Hackman <hugh@privilegedescalation.io>
Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-03-20 22:33:28 +00:00
privilegedescalation-paperclip[bot] 453e320f35 fix: use GitHub App token for release PR creation (#31)
The org blocks GITHUB_TOKEN from creating pull requests
("Write permissions for workflows are disabled by the organization").
Switch to a GitHub App installation token generated via
actions/create-github-app-token for the PR creation step.

Requires org-level secrets RELEASE_APP_ID and RELEASE_APP_PRIVATE_KEY
to be configured. Calling workflows must pass these secrets.

Closes #30

Co-authored-by: Hugh Hackman <hugh@privilegedescalation.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 13:24:28 +00:00
privilegedescalation-paperclip[bot] d733a720af fix: install gh CLI to user-writable path on ARC runners (#29)
ARC runner containers run as non-root, so `mv` to /usr/local/bin fails
with permission denied. Install to $HOME/.local/bin instead and add to
GITHUB_PATH.

Co-authored-by: Hugh Hackman [bot] <hugh-hackman[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 21:32:56 +00:00
Hugh Hackman bff9014cf8 fix: update runner label from local-ubuntu-latest to runners-privilegedescalation
ARC runner scale set was recreated on 2026-03-19 with label
`runners-privilegedescalation` but all shared workflows still referenced
`local-ubuntu-latest`. This label mismatch caused startup_failure on
every Release workflow and queued CI jobs with no runner to pick them up.

Updates all 4 workflows and the actionlint config to match the current
ARC runner scale set label.

Closes #27
2026-03-19 20:11:51 +00:00
Hugh Hackman[bot] cfb35fe73d ci: update actions/checkout from v4 to v6 in all reusable workflows
actions/checkout v6 was already adopted in headlamp-agent-skills.
This brings the org-level reusable workflows (plugin-ci, plugin-release,
ci-health-check) up to the same version. Affects all plugin repos that
call these shared workflows.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-18 07:24:02 +00:00
hugh-hackman[bot] 538a7bf024 ci: use binary download for gh CLI install on self-hosted runners (#18)
The apt-based gh CLI install requires sudo which is not available on our
self-hosted container runners. Replace with a direct binary download from
GitHub releases that works without elevated permissions.

Fixes the "gh: command not found" error in the release workflow's
"Create PR for version bump" step.

Co-authored-by: Hugh Hackman <hugh@privilegedescalation.com>
Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-03-17 17:44:34 +00:00
Hugh Hackman 4c0ad08db3 ci: install gh CLI in release workflow for self-hosted runners
The self-hosted runner (local-ubuntu-latest) does not have gh CLI
pre-installed, causing the PR creation step to fail with
"gh: command not found" after the release is published.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-17 12:34:16 +00:00
hugh-hackman[bot] 510569be7b ci: remove Docker container from release workflow
Remove container: node from the release job to avoid Docker Hub rate
limits on self-hosted runners. Uses actions/setup-node@v4 instead,
matching the pattern already applied in plugin-ci.yaml (PR#14).

Changes:
- Remove container: node:${{ inputs.node-version }}
- Add setup-node@v4 step with npm cache after checkout
- Remove apt-get install step (jq, curl, git already on runner)
- Remove manual GitHub CLI install step (gh already on runner)

Co-authored-by: Hugh Hackman <hugh@privilegedescalation.com>
Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-03-16 10:52:05 +00:00
hugh-hackman[bot] d0b4428af7 fix: remove Docker container from CI, use setup-node instead
Eliminates Docker Hub rate limit by replacing container: node:22 with setup-node@v4.
Also fixes release workflow branch creation order.

Closes privilegedescalation/.github#14

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-15 16:55:37 +00:00
hugh-hackman[bot] 0ef78ac580 feat: make reusable workflows strictly container-native (#10)
Co-authored-by: gandalf-the-greybeard[bot] <gandalf-the-greybeard[bot]@users.noreply.github.com>
2026-03-10 23:44:40 +00:00
Chris Farhood 4361c131f0 Merge pull request #9 from privilegedescalation/fix/release-workflow-branch-protection
fix: release workflow creates PR instead of pushing to main
2026-03-09 17:09:10 -04:00
gandalf-the-greybeard[bot] 7a035654c9 feat: auto-merge and cleanup release version bump PRs
The release PR is just a version bump + checksum update. Enable
auto-merge with squash and delete the release branch after merge
to prevent branch accumulation.
2026-03-09 19:22:10 +00:00
gandalf-the-greybeard[bot] caee689f15 fix: release workflow creates PR instead of pushing to main
The release workflow pushed directly to main which fails on repos
with branch protection enabled. This broke the polaris plugin v0.7.0
release.

Changes:
- Create release/vX.Y.Z branch instead of committing to main
- Push to the release branch + tags
- Create a PR to merge the version bump back to main
- Add pull-requests: write permission
2026-03-09 19:18:07 +00:00
gandalf-the-greybeard[bot] 254bd4fbc3 fix: add tag-exists guard to release workflow
Fail fast when a release tag already exists instead of running the
full build+package cycle only to fail at git push. Saves CI time on
duplicate workflow_dispatch triggers.
2026-03-09 06:20:52 +00:00
hugh-hackman[bot] 521d120425 feat: add reusable CI and release workflows for Headlamp plugins 2026-03-08 00:44:51 +00:00