Skip to content

Commit 2dfb479

Browse files
committed
Set GITHUB_TOKEN to curl command
Signed-off-by: Jerome Prinet <jprinet@gradle.com>
1 parent 10e3bf2 commit 2dfb479

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
name: Get latest release
22
description: 'Install Scripts latest release'
33

4+
inputs:
5+
token:
6+
description: 'Github token'
7+
required: true
8+
49
runs:
510
using: "composite"
611
steps:
712
- name: Get latest release
813
run: |
9-
downloadUrl=$(curl -s https://api.github.com/repos/gradle/gradle-enterprise-build-validation-scripts/releases/latest | jq -c '.assets[] | select(.content_type == "application/zip")' | jq -r .browser_download_url | grep -v maven)
14+
downloadUrl=$(curl -S -H 'authorization: Bearer ${{ inputs.token }}' https://api.github.com/repos/gradle/gradle-enterprise-build-validation-scripts/releases/latest | jq -c '.assets[] | select(.content_type == "application/zip")' | jq -r .browser_download_url | grep -v maven)
1015
curl -s -L -o gradle-enterprise-gradle-build-validation.zip $downloadUrl
1116
unzip -q -o gradle-enterprise-gradle-build-validation.zip
1217
shell: bash

0 commit comments

Comments
 (0)