From d4302003c6aadbfbd4170f0cc0bfa5a60b5f4049 Mon Sep 17 00:00:00 2001 From: Chuck Grindel Date: Mon, 11 Dec 2023 15:41:38 -0700 Subject: [PATCH 1/2] chore: use extractions/netrc to configure GitHub API authentication --- .../authenticate_github_api/action.yaml | 21 ------------------- .github/workflows/workflow.yaml | 5 +++-- 2 files changed, 3 insertions(+), 23 deletions(-) delete mode 100644 .github/actions/authenticate_github_api/action.yaml diff --git a/.github/actions/authenticate_github_api/action.yaml b/.github/actions/authenticate_github_api/action.yaml deleted file mode 100644 index 6fcf2c6ff..000000000 --- a/.github/actions/authenticate_github_api/action.yaml +++ /dev/null @@ -1,21 +0,0 @@ -name: Authenticate with GitHub API -description: | - Authenticated GitHub API requests are not rate-limited like unauthenticated requests. - -# For more details: https://github.com/tweag/rules_haskell/pull/1494 - -inputs: - github_token: - type: string - -runs: - using: composite - steps: - - shell: bash - env: - GITHUB_TOKEN: ${{ inputs.github_token }} - run: | - cat >~/.netrc <>.bazelrc.local < Date: Mon, 11 Dec 2023 15:46:47 -0700 Subject: [PATCH 2/2] Replace the other occurrences. --- .github/workflows/workflow.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index f9b9e5662..5ee7797b8 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -80,9 +80,10 @@ jobs: buildbuddy_api_key: ${{ secrets.BUILDBUDDY_API_KEY }} bazelrc_path: .bazelrc.auth - uses: ./.github/actions/set_tcp_keepalive_time - - uses: ./.github/actions/authenticate_github_api + - uses: extractions/netrc@v1 with: - github_token: ${{ secrets.GITHUB_TOKEN }} + machine: api.github.com + password: ${{ secrets.GITHUB_TOKEN }} - name: Configure run: | case ${{ runner.os }} in @@ -182,9 +183,10 @@ jobs: buildbuddy_api_key: ${{ secrets.BUILDBUDDY_API_KEY }} bazelrc_path: .bazelrc.auth - uses: ./.github/actions/set_tcp_keepalive_time - - uses: ./.github/actions/authenticate_github_api + - uses: extractions/netrc@v1 with: - github_token: ${{ secrets.GITHUB_TOKEN }} + machine: api.github.com + password: ${{ secrets.GITHUB_TOKEN }} - name: Configure shell: bash run: |