See it on the 🏪 marketplace.
Suggests dispatchable workflows for a branch that would otherwise trigger the dispatchable workflows from pushes to the trunk.
- name: Dispatch 📤 Suggestor 📥 uses: Skenvy/dispatch-suggestor@v1 with: github_token: ${{ secrets.GITHUB_TOKEN }}
Embed the action in a workflow triggered on pull_request
events, and it will determine a list of workflows with workflow_dispatch
triggers that would also be triggered on push
to the trunk branch (but that aren't triggered by push
ing to the PR's head branch).
E.g. if you have several workflow_dispatch
based workflows that are each also triggered by pushes to the trunk branch but limited to specific file triggers, this action will evaluate the changes in the PR and determine for each dispatchable workflow if they are relevant or not, and then suggest the ones it considers relevant.
permissions
set to at least
permissions: actions: read contents: read pull-requests: write
'main'
.$GITHUB_WORKSPACE
. It should be the same as the value provided to @actions/checkout
with.path:
, or default.'.'
.list-workflows-pagination-limit
list-repository-workflows
API. An input of 0
will retrieve all.100
.comment-unique-identifier
'DEFAULT_COMMENT_UNIQUE_IDENTIFIER'
.''
.'false'
.'false'
.'false'
.list-of-dispatchable-workflows
workflow_dispatch
triggers.on:
to use for the workflow
deployment_branch
of main
.on.pull_request.paths-ignore
if there're any paths you're certain won't ever trigger any other workflow.on: pull_request: branches: - 'main'Checkout: In
jobs.<job_id>.steps[*]
uses: Skenvy/dispatch-suggestor@v1
step, you'll need to checkout
, as this action checks the local state of workflows.- name: 🏁 Checkout uses: actions/checkout@v4 with: sparse-checkout: | .github/workflows/*.y*ml sparse-checkout-cone-mode: falsethis: In
jobs.<job_id>.steps[*].uses
:
main
, and the checkout
above, in the least decorated way;- uses: Skenvy/dispatch-suggestor@v1 with: github_token: ${{ secrets.GITHUB_TOKEN }}
See this example here.
name: Dispatch 📤 Suggestor 📥 on: pull_request: permissions: actions: read contents: read pull-requests: write jobs: suggestor: name: Dispatch 📤 Suggestor 📥 runs-on: 'ubuntu-latest' steps: - name: 🏁 Checkout uses: actions/checkout@v4 with: sparse-checkout: | .github/workflows/*.y*ml sparse-checkout-cone-mode: false - name: Dispatch 📤 Suggestor 📥 id: dispatch-suggestor uses: Skenvy/dispatch-suggestor@v1 with: github_token: ${{ secrets.GITHUB_TOKEN }} - name: List changed files run: echo "${{ steps.dispatch-suggestor.outputs.list-of-changed-files }}" - name: List dispatchable workflows run: echo "${{ steps.dispatch-suggestor.outputs.list-of-dispatchable-workflows }}"
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4