From 76bb94c19f5362a09de9f0b840bb331dbcb97c06 Mon Sep 17 00:00:00 2001 From: David Crammer Date: Fri, 20 Oct 2023 09:36:37 -0700 Subject: [PATCH] Update workflow dist --- .github/workflows/wf1.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/wf1.yaml b/.github/workflows/wf1.yaml index 4c24f8a..9aa42be 100644 --- a/.github/workflows/wf1.yaml +++ b/.github/workflows/wf1.yaml @@ -19,7 +19,7 @@ jobs: REPOS=$(curl -H "Authorization: token $TOKEN" \ -H "Accept: application/vnd.github.mercy-preview+json" \ https://api.github.com/search/repositories?q=topic:$TOPIC+org:$ORG \ - | jq -r '.items[].full_name') + | jq -r '.items[].full_name' | tr '\n' ' ') # Convert newline to space echo "REPOS=$REPOS" >> $GITHUB_ENV env: TOKEN: ${{ secrets.GH_PAT }} @@ -32,7 +32,10 @@ jobs: git config user.email "actions@github.com" git config user.name "GitHub Actions" - for repo in ${{ steps.fetch-repos.outputs.repos }}; do + # Convert space-separated list back to array + IFS=' ' read -ra REPO_ARRAY <<< "$REPOS" + + for repo in "${REPO_ARRAY[@]}"; do git clone "https://$TOKEN:x-oauth-basic@github.com/$repo.git" # Create the .github/workflows directory if it doesn't exist