Skip to content

Commit fd8bbbf

Browse files
committed
try suffix only
1 parent bb0f9cc commit fd8bbbf

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

.github/workflows/multi-approvers.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ on:
1818
workflow_call:
1919
inputs:
2020
# Path to a JSON file containing the members of the org. This should be
21-
# the full path from the repo root without a leading `/`.
21+
# the full path that should work with the https://raw.githubusercontent.com/ prefix.
2222
# See the README for more.
2323
org-members-path:
2424
required: true
@@ -43,6 +43,24 @@ jobs:
4343
- name: 'Checkout the calling repo'
4444
uses: 'actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683' # ratchet:actions/checkout@v4
4545

46+
- name: Download members.json
47+
id: 'download-members-json'
48+
run: |-
49+
MEMBERS_JSON="${RUNNER_TEMP}/${GITHUB_SHA:0:7}.members.json"
50+
51+
# Download the file, passing in authentication to get a higher rate
52+
# limit: https://docs.github.com/en/rest/overview/resources-in-the-rest-api?apiVersion=2022-11-28#rate-limits-for-requests-from-github-actions
53+
curl "https://raw.githubusercontent.com/${{ inputs.org-members-path }}" \
54+
--silent \
55+
--fail \
56+
--location \
57+
--header "Authorization: Token ${{ github.token }}" \
58+
--output "${MEMBERS_JSON}"
59+
60+
# Save the result to an output.
61+
echo "::notice::Downloaded members.json to ${MEMBERS_JSON}"
62+
echo "output-file=${MEMBERS_JSON}" >> "${GITHUB_OUTPUT}"
63+
4664
- name: 'Download multi-approvers.js'
4765
id: 'download-multi-approvers-js'
4866
run: |-
@@ -66,7 +84,7 @@ jobs:
6684
with:
6785
retries: 3
6886
script: |-
69-
const orgMembersPath = '${{ github.action_path }}/${{ inputs.org-members-path }}';
87+
const orgMembersPath = '${{ steps.download-members-json.outputs.output-file }}';
7088
// Warning: this should not be quoted, otherwise comparisons will not work in JS.
7189
const prNumber = ${{ github.event.pull_request.number }}
7290
const repoName = '${{ github.event.repository.name }}'

.github/workflows/multi_approvers.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ jobs:
2828
multi-approvers:
2929
uses: 'googleapis/google-auth-library-java/.github/workflows/multi-approvers.yml@multi-approvers'
3030
with:
31-
org-members-path: .github/workflows/members.json
31+
org-members-path: googleapis/google-auth-library-java/main/.github/workflows/members.json

0 commit comments

Comments
 (0)