Skip to content
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

Contribution: README section about having GH Actions trigger on fast-forwards #38

Closed
0xangelo opened this issue Jan 15, 2025 · 3 comments · Fixed by #40
Closed

Contribution: README section about having GH Actions trigger on fast-forwards #38

0xangelo opened this issue Jan 15, 2025 · 3 comments · Fixed by #40

Comments

@0xangelo
Copy link
Contributor

Hi, I'm willing to contribute a section to the README about triggering GitHub Actions after /fast-foward succeeds and looking for guidance on how best to add it.

TLDR: I think it's worth to tell users that they will want to use a personal access token for the action if they want their CI/CD to trigger after a successful /fast-forward


With the standard GITHUB_TOKEN, after a fast-forward succeeds, no workflows will be triggered. This may be confusing as the user might expect their CI/CD to trigger on any push to main for example.

The issue seems to be that GitHub doesn't trigger Actions on events created with GITHUB_TOKEN, to avoid recursive worflows. The solution seems to be using a personal access token, quoting from the release-please-action docs.

I tested it myself on one of my repositories and it seems to work. The only anomaly is that the bot's message will appear as if they were written by the owner of the personal access token. So the fast-forward action triggers on the final comment created by /fast-forward itself, and then cancels itself
image

@nwalfield
Copy link
Contributor

Do I understand correctly that the workflows for the branch are triggered correctly, but workflows associated with the main branch are not triggered when the fast-forward action does the fast forward?

If so, I would welcome a patch explaining the problem, and a section explaining your workaround.

Thanks!

@0xangelo
Copy link
Contributor Author

0xangelo commented Jan 15, 2025

but workflows associated with the main branch are not triggered when the fast-forward action does the fast forward?

Exactly the above

If so, I would welcome a patch explaining the problem, and a section explaining your workaround.

Cool! I'll open a PR later this week and we can figure out where the best place in the README is

P.s.: thank you for this action! I'd buy you a coffee if I could

@nwalfield
Copy link
Contributor

Thanks!

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 a pull request may close this issue.

2 participants