Skip to content

Commit

Permalink
Adds PAT check to shared pr check (airbytehq#15453)
Browse files Browse the repository at this point in the history
* Adds PAT check to shared pr check

* Name change

* Removes "safe_to_push" string

* Adds OCTAVIA_PAT and uses the found PAT

found PAT was not used in all locales, so this could have still failed
on an expired OCTAVIA_PAT before this change
  • Loading branch information
supertopher authored Aug 9, 2022
1 parent dd23156 commit 06a18d4
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions .github/workflows/shared-pulls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,35 @@ on:
types: [opened, labeled, unlabeled, ready_for_review, synchronize, reopened]

jobs:
find_valid_pat:
name: "Find a PAT with room for actions"
timeout-minutes: 10
runs-on: ubuntu-latest
outputs:
pat: ${{ steps.variables.outputs.pat }}
steps:
- name: Checkout Airbyte
uses: actions/checkout@v2
- name: Check PAT rate limits
id: variables
run: |
./tools/bin/find_non_rate_limited_PAT \
${{ secrets.OCTAVIA_PAT }} \
${{ secrets.AIRBYTEIO_PAT }} \
${{ secrets.OSS_BUILD_RUNNER_GITHUB_PAT }} \
${{ secrets.SUPERTOPHER_PAT }} \
${{ secrets.DAVINCHIA_PAT }}
shared-pulls:
name: "Label github issues for tracking"
needs:
- find_valid_pat
runs-on: ubuntu-latest
steps:
- uses: nick-fields/private-action-loader@v3
with:
pal-repo-token: "${{ secrets.OCTAVIA_PAT }}"
pal-repo-token: ${{ needs.find_valid_pat.outputs.pat }}
pal-repo-name: airbytehq/workflow-actions@production
# the following input gets passed to the private action
token: "${{ secrets.OCTAVIA_PAT }}"
token: ${{ needs.find_valid_pat.outputs.pat }}
command: "pull"

0 comments on commit 06a18d4

Please sign in to comment.