Replies: 2 comments
-
|
Thanks for sharing @mkesper 👏 |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
To update: You don't actually need / want to do a checkout in a composite action. It really runs in the same context. Found that out when encountering another error (overriding a commit created in the Github action). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This is not a bug but might be helpful for other people banging their head against the wall:
As we had several actions sharing deployment and testing I turned these steps into a composite action (https://docs.github.com/en/actions/tutorials/create-actions/create-a-composite-action#creating-a-composite-action-within-the-same-repository). The alternative was to call a workflow which is only possible on job level, not on steps level (D'oh!).
At the beginnging of the composite action you need to check out the repo to do anything with it.
This Github login overwrote my first login with a PAT, leading to not being able to push to main (due to branch protection) in only one constellation of my jobs...
Solution: Allow passing the PAT to the composite action and do the checkout with the (optional) input token.
Fixed minimal example:
Job:
.github/actions/deploy_stage/action.yml:
Beta Was this translation helpful? Give feedback.
All reactions