Skip to content

Commit bb0f9cc

Browse files
committed
try using github.action_path
1 parent fe2a1a1 commit bb0f9cc

File tree

2 files changed

+2
-20
lines changed

2 files changed

+2
-20
lines changed

.github/workflows/multi-approvers.yml

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -43,24 +43,6 @@ 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 "${{ 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-
6446
- name: 'Download multi-approvers.js'
6547
id: 'download-multi-approvers-js'
6648
run: |-
@@ -84,7 +66,7 @@ jobs:
8466
with:
8567
retries: 3
8668
script: |-
87-
const orgMembersPath = '${{ steps.download-members-json.outputs.output-file }}';
69+
const orgMembersPath = '${{ github.action_path }}/${{ inputs.org-members-path }}';
8870
// Warning: this should not be quoted, otherwise comparisons will not work in JS.
8971
const prNumber = ${{ github.event.pull_request.number }}
9072
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: https://raw.githubusercontent.com/googleapis/google-auth-library-java/main/.github/workflows/members.json
31+
org-members-path: .github/workflows/members.json

0 commit comments

Comments
 (0)