1
0
mirror of synced 2025-12-29 09:03:46 -05:00
Files
airbyte/.github/workflows/label-github-issues.yml
2022-09-28 10:06:36 -05:00

38 lines
1.2 KiB
YAML

name: "Add labels to github issues based on context"
on:
issues:
types: [opened, labeled, unlabeled]
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: UUID ${{ github.event.inputs.uuid }}
run: true
- 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.OCTAVIA_4_ROOT_ACCESS }}
shared-issues:
name: "Add Labels to Issues. Safe to Merge on fail"
runs-on: ubuntu-latest
needs:
- find_valid_pat
steps:
- uses: nick-fields/private-action-loader@v3
with:
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: "${{ needs.find_valid_pat.outputs.pat }}"
# ref: https://github.com/airbytehq/workflow-actions/blob/main/src/bin_issue.ts
command: "issue"