Skip to content

Commit

Permalink
pass in variable with --arg to jq
Browse files Browse the repository at this point in the history
  • Loading branch information
tyliec committed Feb 25, 2024
1 parent df78d98 commit f1c8ced
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,9 @@ jobs:
cat $repository-output.json
jq --argjson newContributors "$(cat $repository-output.json)" \
'.contributors["$repository"] |= (. + $newContributors) |
.contributors["$repository"] |= unique_by(.username)' \
--arg repo "$repository" \
'.contributors[$repo] |= (. + $newContributors) |
.contributors[$repo] |= unique_by(.username)' \
"contributors.json" > temp.json && mv temp.json "contributors.json"
rm $repository-contributors.json
Expand Down

0 comments on commit f1c8ced

Please sign in to comment.