File tree Expand file tree Collapse file tree 2 files changed +21
-29
lines changed
Expand file tree Collapse file tree 2 files changed +21
-29
lines changed Original file line number Diff line number Diff line change 4343 - name: 'Checkout the calling repo'
4444 uses: 'actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683' # ratchet:actions/checkout@v4
4545
46+ steps:
47+ - name: Download members.json
48+ id: 'download-members-json'
49+ run: |-
50+ MEMBERS_JSON="${RUNNER_TEMP}/${GITHUB_SHA:0:7}.members.json"
51+
52+ # Download the file, passing in authentication to get a higher rate
53+ # limit: https://docs.github.com/en/rest/overview/resources-in-the-rest-api?apiVersion=2022-11-28#rate-limits-for-requests-from-github-actions
54+ curl "${{ inputs.org-members-path }}" \
55+ --silent \
56+ --fail \
57+ --location \
58+ --header "Authorization: Token ${{ github.token }}" \
59+ --output "${MEMBERS_JSON}"
60+
61+ # Save the result to an output.
62+ echo "::notice::Downloaded members.json to ${MEMBERS_JSON}"
63+ echo "output-file=${MEMBERS_JSON}" >> "${GITHUB_OUTPUT}"
64+
4665 - name: 'Download multi-approvers.js'
4766 id: 'download-multi-approvers-js'
4867 run: |-
6685 with:
6786 retries: 3
6887 script: |-
69- let orgMembersPath = '${{ inputs.org-members-path }}';
70- if (!orgMembersPath.startsWith('/')) {
71- orgMembersPath = '${{ github.workspace }}/${{ inputs.org-members-path }}';
72- }
88+ const orgMembersPath = '${{ steps.download-members-json.outputs.output-file }}';
7389 // Warning: this should not be quoted, otherwise comparisons will not work in JS.
7490 const prNumber = ${{ github.event.pull_request.number }}
7591 const repoName = '${{ github.event.repository.name }}'
Original file line number Diff line number Diff line change @@ -25,31 +25,7 @@ concurrency:
2525 cancel-in-progress: true
2626
2727jobs:
28- download_members:
29- runs-on: ubuntu-latest
30- steps:
31- - name: Download members.json
32- id: 'download_members'
33- run: |-
34- MEMBERS_JSON="${RUNNER_TEMP}/${GITHUB_SHA:0:7}.members.json"
35-
36- # Download the file, passing in authentication to get a higher rate
37- # limit: https://docs.github.com/en/rest/overview/resources-in-the-rest-api?apiVersion=2022-11-28#rate-limits-for-requests-from-github-actions
38- curl "https://raw.githubusercontent.com/googleapis/google-auth-library-java/refs/heads/main/.github/workflows/members.json" \
39- --silent \
40- --fail \
41- --location \
42- --header "Authorization: Token ${{ github.token }}" \
43- --output "${MEMBERS_JSON}"
44-
45- # Save the result to an output.
46- echo "::notice::Downloaded members.json to ${MEMBERS_JSON}"
47- echo "output-file=${MEMBERS_JSON}" >> "${GITHUB_OUTPUT}"
48- outputs:
49- members_path: ${{ steps.download_members.outputs.output-file }}
50-
5128 multi-approvers:
52- needs: download_members
5329 uses: 'googleapis/google-auth-library-java/.github/workflows/multi-approvers.yml@multi-approvers'
5430 with:
55- org-members-path: ${{ needs.download_members.outputs.members_path }}
31+ org-members-path: https://raw.githubusercontent.com/googleapis/google-auth-library-java/main/.github/workflows/members.json
You can’t perform that action at this time.
0 commit comments