Created
May 30, 2024 17:12
-
-
Save dmitrym0/f9d37d4975103c19c9332edd65f7699b to your computer and use it in GitHub Desktop.
a script to select a workflow and specify a branch to run this workflow on
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# List workflows, pick one with fzf, get its ID | |
workflow_id=$(gh workflow list --json id,name | jq -r '.[] | "\(.id) \(.name)"' | fzf --prompt="Select Workflow: " | awk '{print $1}') | |
# List branches, pick one with fzf | |
branch=$(git branch -r | sed 's/origin\///' | fzf --prompt="Select Branch: ") | |
# Run the selected workflow with the specified b |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment