Skip to content

ci: remove borales/actions-yarn and peter-evans/create-pull-request#56

Merged
mattgle merged 1 commit into
mainfrom
ci/remove-third-party-actions
May 12, 2026
Merged

ci: remove borales/actions-yarn and peter-evans/create-pull-request#56
mattgle merged 1 commit into
mainfrom
ci/remove-third-party-actions

Conversation

@mattgle
Copy link
Copy Markdown
Contributor

@mattgle mattgle commented May 11, 2026

What

Removes every non-actions/* action from .github/workflows/:

  • borales/actions-yarn in unit-tests.ymlcorepack enable + yarn install --frozen-lockfile.
  • peter-evans/create-pull-request in update-ofac.yml → direct shell using the gh CLI (preinstalled on GitHub-hosted runners). The replacement preserves the action's cron-idempotent behaviour: if the branch already has an open PR, the force-push updates it in place; otherwise a new PR is created.

Adds an explicit permissions: block on update-ofac.yml (contents: write, pull-requests: write) because the default GITHUB_TOKEN is read-only, and the shell steps now need write scopes to push the branch and open the PR.

Why

Both actions ran inside our workflow with the GITHUB_TOKEN's scopes. peter-evans/create-pull-request is the more concerning of the two — it's an action that, by design, runs git push and the gh pr API against our repo with the live token. Replacing it with a handful of shell lines removes that intermediary and makes the required permissions explicit and minimal.

Drops two third-party actions from .github/workflows/:

- borales/actions-yarn (in unit-tests.yml): replaced with corepack +
  yarn install --frozen-lockfile, using setup-node's built-in yarn
  cache.

- peter-evans/create-pull-request (in update-ofac.yml): replaced with
  direct shell commands using the gh CLI (preinstalled on
  GitHub-hosted runners). The replacement preserves the same
  cron-idempotent behaviour - if the branch already has an open PR,
  the force-push updates it in place; otherwise a new PR is opened.
  An explicit `permissions:` block declares the `contents: write` and
  `pull-requests: write` scopes the new shell steps need (the default
  GITHUB_TOKEN is read-only by default).
@mattgle mattgle self-assigned this May 11, 2026
@mattgle mattgle marked this pull request as ready for review May 11, 2026 18:02
@mattgle mattgle requested a review from mesquka May 11, 2026 18:03
@mattgle mattgle merged commit b37e643 into main May 12, 2026
3 checks passed
@mattgle mattgle deleted the ci/remove-third-party-actions branch May 12, 2026 13:02
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