-
Notifications
You must be signed in to change notification settings - Fork 15
ci: fix release workflow - git push, split oidc from custom github app #1121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
View your CI Pipeline Execution ↗ for commit 3aa6a2b
☁️ Nx Cloud last updated this comment at |
|
View your CI Pipeline Execution ↗ for commit 3aa6a2b ☁️ Nx Cloud last updated this comment at |
@code-pushup/ci
@code-pushup/cli
@code-pushup/core
@code-pushup/create-cli
@code-pushup/models
@code-pushup/nx-plugin
@code-pushup/coverage-plugin
@code-pushup/eslint-plugin
@code-pushup/js-packages-plugin
@code-pushup/jsdocs-plugin
@code-pushup/lighthouse-plugin
@code-pushup/typescript-plugin
@code-pushup/utils
@code-pushup/models-transformers
commit: |
Code PushUp😟 Code PushUp report has regressed – compared current commit aa7ff0d with previous commit 38b04e4. 🕵️ See full comparison in Code PushUp portal 🔍 🏷️ Categories👎 2 groups regressed, 👎 4 audits regressed, 17 audits changed without impacting score🗃️ Groups
19 other groups are unchanged. 🛡️ Audits
589 other audits are unchanged. |
The story continues 😅
Related issues and PRs
Problem 1 - authorizing
git pushAfter my last PR, the release workflow failed with:
This one seems fairly straightforward. I copied
persist-credentials: falsefrom an example inactions/create-github-app-tokendocs. But we need to persist credentials to authorizegit push.Problem 2 - OIDC not compatible with GitHub App
The npm docs on trusted publishers mention
id-token: writemust be configured, but that permission isn't available for GitHub Apps. After doing some more research, I've concluded that OIDC is only supported when using the default GitHub Actions bot (built-inGITHUB_TOKEN). Which poses a dilemma, because we can't bypass themainbranch's Require a pull request before merging rule without the GitHub App.In the end, I think I've solved this problem by splitting it into 2 workflows:
release.ymlmain(merging a PR)nx release --skip-publishgit pushpublish.ymlnx release publishid-token: writepermissionsgit pushnpm publishI've also changed our access settings on npmjs.com for all (13 😅) packages:
release.ymlwithpublish.ymlreleaseenvironment (mainbranch only)