forked from microsoft/fast
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update to dynamically generate json file (microsoft#3041)
* update to improve speed of filing PR * Revert "update to improve speed of filing PR" This reverts commit 83c177e. * remove and ignore local event branch file * add bash script to dynamically create local git branch file * update documentation
- Loading branch information
Showing
4 changed files
with
44 additions
and
18 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
|
||
echo " ------------------------------------------------------------------------------------------------ " | ||
echo "| This script will dynamically create an event.json file for use by Nektos/Act in testing GitHub |" | ||
echo "| Actions locally. |" | ||
echo " -------------------------------------------------------------------------------------------------" | ||
|
||
# Ask for Branch Name | ||
echo -n "Enter git branch name? " | ||
read branch_name | ||
|
||
# Ask for Event Type | ||
echo -n "Enter the GitHub Event to trigger the GitHub Action? " | ||
read github_event | ||
|
||
# Combine user inputs into the json template | ||
# Set contents of the file to be overwritten | ||
echo '{ | ||
"push": { | ||
"head": { | ||
"ref": "'$branch_name'" | ||
}, | ||
"base": { | ||
"ref": "'$branch_name'" | ||
} | ||
} | ||
}' >& $github_event.json | ||
|
This file was deleted.
Oops, something went wrong.
This file contains 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