Hi there, this blog post explains how to manually trigger builds of GitHub actions.
Why would you want to do that?
Instead of just wait...
For further actions, you may consider blocking this person and/or reporting abuse
GitHub has added
workflow_dispatch
event for manually trigger.FYI: github.blog/changelog/2020-07-06-g...
Another alternative is to add an event hook for the
on: respository_dispatch
event which should let you trigger builds. See the docs here: help.github.com/en/actions/automat...Oh yes, thanks !
My solution use simplicity with the star button which already here and nothing to implement more than the workflow.
The repository_dispatch event has advantage to target other branch than master contrary to the watch event with the star.
Spot on.
thanks @jefftriplett i put together an easy example repo based on this: github.com/drewmullen/actions-play...
Get a solution to allows to all repository collaborators:
Nice ! I add it on the post :)
Thx, even though I'll most likely not use the "star method", your article is a good reference collection regarding github action triggers.
Do you have a reference/example at hand how to write the condition to check if the stargazer is in the team of an org (or in a list of users?)
Thanks, my article hasn't vocation to deliver the best method and as I said, it's really hacky, but good to know and also there are other options.
I haven’t an example right now but you can easily do a step with the logic of checking if the user is part of a list of the users in the language you prefer.
Execute the file and save the result as variable and return a boolean if it's true or false. And the following steps will be conditioned according to the result.
Maybe this example can helps you :
In this case, in your workflow, you will be able to reuse the name of the branch if you want to do a step only on this branch :
Hi all!
I'm hoping posting here won't be a problem.
I wanted to share a small project that I've been working on with a buddy that solves this problem.
actionspanel.app/
ActionsPanel uses this same
repository_dispatch
API but does so with a GitHub App token so that you don't need to worry about managing your own PAT. This also makes it much easier to trigger your actions across teams with multiple people. Then you don't need to share the PAT with each other or each create your own PATs.You configure your buttons with a declarative yaml file that you leave in the repo, and ActionsPanel will read that file and dynamically create your UI for you to trigger your actions.
We'd love to get your feedback on this project. It's very simple still but solves the core problem of triggering your actions.
If you do have feedback or any questions, feel free to post in this thread, or email us directly at support (at) actionspanel (dot) app
Looking forward to your feedback!
Is it open source?
Asking for repo write permissions from a closed source code project is a little too much for me.
I needed to add
:
to the end ofwatch
to get this to work.Did nobody actually try this code, or is there some stricter Action language interpretation on my end?
It was already tested by me because I add a gif demo of the watch event. GitHub Actions is based on yaml language. It's a typo, I update the article thanks.
Looks good but it will spam your followers feed, if you have a large amount of followers right?
Good question, in fact no, because it's only notifying on discussions about :
of the starred repository.
Further details just here :)