Skip to content

Commit

Permalink
.github/workflows/test.yml: Add GITHUB_TOKEN to curl command line
Browse files Browse the repository at this point in the history
Signed-off-by: Andrei Horodniceanu <[email protected]>
  • Loading branch information
the-horo committed May 6, 2024
1 parent 435f191 commit c363c80
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,12 @@ jobs:
run: |
if [[ ${{ matrix.dub }} == 'latest' ]]
then
DUB_VERSION_FOR_TEST=$(curl -s https://api.github.com/repos/dlang/dub/releases/latest | jq -r '.tag_name | sub("v(?<v>.+)"; .v)')
curlCmd=(
curl -s
--header "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}"
https://api.github.com/repos/dlang/dub/releases/latest
)
DUB_VERSION_FOR_TEST=$("${curlCmd[@]}" | jq -r '.tag_name | sub("v(?<v>.+)"; .v)')
else
DUB_VERSION_FOR_TEST=${{ matrix.dub }}
fi
Expand Down

0 comments on commit c363c80

Please sign in to comment.