ci: use github app token #19
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Our
bumpworkflow was unable to trigger the dependentpublishworkflow due to using theGITLAB_TOKENwhich has limitations to avoid recursive workflows. See https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/triggering-a-workflow#triggering-a-workflow-from-a-workflowSo the solution is either to use a Personal Access Token, or a GitHub App Installation Token.
The GitHub App Installation Token seems like a more future-proof setup, so here is an initial attempt at getting it to work.
The idea here is that we now have an organization app which should be given access to this repository: https://github.com/apps/elements-helper
Then we use a github action actions/create-github-app-token@v1 to create a special 1-hour token from the app, which our actions can use! And with this, the
publishworkflow should be created 😄I've created the associated
ELEMENTS_HELPER_APP_IDandELEMENTS_HELPER_PRIVATE_KEYwhich will be used by the action to create the token.