updated github_actions_in_use_repo.sh

pull/2/head
Hari Sekhon 3 years ago
parent a47f5278e0
commit 62594d3e8e

@ -55,7 +55,13 @@ process_contents(){
grep_github_actions(){
# filtering out anything with .github in it as that will be a .github/workflows/file.yaml, not an action
{ grep -Eo '^[^#]+[[:space:]]uses:.+@[^#[:space:]]+' || : ; } |
sed 's/^[^#]*[[:space:]]uses:[[:space:]]*//; /\.github/d; s/#.*$//'
sed '
s/^[^#]*[[:space:]]uses:[[:space:]]*//;
s/#.*$//;
s/[[:space:]]*$//;
/\.github/d;
' |
sort -fu
}
timestamp "Checking repo '$repo'"
@ -79,6 +85,7 @@ if "$srcdir/github_api.sh" "/repos/$repo/contents/.github/workflows" &>/dev/null
{ grep -Eo '^[^#]+[[:space:]]uses:.+/.github/workflows/.+@[^#[:space:]]+' || : ; } <<< "$contents" |
sed 's/^[^#]*[[:space:]]uses:[[:space:]]*//; s/#.*$//;' |
while read -r reusable_workflow; do
timestamp "Checking reusable workflow: $reusable_workflow"
reusable_workflow="${reusable_workflow/.github/contents/.github}"
reusable_workflow="${reusable_workflow/@/?ref=}"
"$srcdir/github_api.sh" "/repos/$reusable_workflow" |

Loading…
Cancel
Save