digdir / designsystemet

Designsystemet
https://designsystemet.no
MIT License
74 stars 37 forks source link

Token Build Action not triggering Storefront Preview Action #1262

Open Thunear opened 9 months ago

Thunear commented 9 months ago

When the token build action commits changes into a branch, the preview actions are not being triggered. This should work in theory because the previews actions are listening to changes that are being commited. I suspect that this is not working because the Token Action does not have the right permissions / secrets when it is received in the preview Actions.

https://docs.github.com/en/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow https://github.com/orgs/community/discussions/62346

From the Github team: This is a deliberate decision by the Actions team in order to prevent accidental "infinite loop" situations, and as an anti-abuse measure. You will be able to work around this using a Personal Access Token in place of the provided token. As this needs to be explicitly provided it will remove any potential for possible abuse, so we recommend using this method when needing to create a pull request.

mimarz commented 9 months ago

Ah, makes sense.