1
0
mirror of synced 2025-12-29 09:03:46 -05:00

Revert "Cleans up label actions && fix broken action (#17324)" (#17329)

This reverts commit dd95d3ad59.
This commit is contained in:
Topher Lubaway
2022-09-28 10:06:36 -05:00
committed by GitHub
parent 0ace81637e
commit 83cdf198f1
6 changed files with 31 additions and 71 deletions

View File

@@ -8,15 +8,19 @@ jobs:
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_4_ROOT_ACCESS }} \
${{ secrets.OCTAVIA_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
@@ -27,7 +31,7 @@ jobs:
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
token: "${{ env.PAT }}"
# 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"

View File

@@ -1,32 +0,0 @@
# Runs internal automation for pull requests
name: "Add labels to github PRs based on context"
on:
pull_request_target:
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
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_4_ROOT_ACCESS }} \
${{ secrets.OCTAVIA_PAT }}
shared-pr-labeller:
name: "Add Labels to PRs. Safe to Merge on fail"
runs-on: ubuntu-latest
steps:
- uses: nick-fields/private-action-loader@v3
with:
pal-repo-token: "${{ secrets.OCTAVIA_PAT }}"
pal-repo-name: airbytehq/workflow-actions@production
# the following input gets passed to the private action
token: "${{ env.PAT }}"
command: "pull"

View File

@@ -1,5 +1,5 @@
# the mapping from filepath to label
# is defined in .github/label-github-issues-by-path.yml
# is defined in .github/labeler.yml
name: "Label PR based on filepath"
on:

View File

@@ -1,32 +1,18 @@
# Notify users/teams when labels are added to an issue.
name: Notify FE team for FE label on issues
name: Notify when adding label to issue
on:
issues:
types: [labeled]
jobs:
find_valid_pat:
name: "Find a PAT with room for actions"
timeout-minutes: 10
runs-on: ubuntu-latest
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_4_ROOT_ACCESS }} \
${{ secrets.OCTAVIA_PAT }}
notify:
name: "Notify FE team on label creation"
runs-on: ubuntu-latest
steps:
- uses: jenschelkopf/issue-label-notification-action@1.3
with:
token: "${{ env.PAT }}"
token: ${{ secrets.OCTAVIA_PAT }}
message: 'cc {recipients}'
# Specify a map of label -> team/user to notify
recipients: |

View File

@@ -1,4 +1,4 @@
name: Trigger action in cloud based on push
name: Notify Cloud of OSS Push to Master
on:
push:
branches:
@@ -6,29 +6,13 @@ on:
workflow_dispatch:
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_4_ROOT_ACCESS }} \
${{ secrets.OCTAVIA_PAT }}
repo-sync:
name: "Fire a Repo Dispatch event to airbyte-cloud"
runs-on: ubuntu-latest
steps:
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ env.pat }}
token: ${{ secrets.OCTAVIA_PAT }}
repository: airbytehq/airbyte-cloud
event-type: oss-push-to-master
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'

18
.github/workflows/shared-pulls.yml vendored Normal file
View File

@@ -0,0 +1,18 @@
# Runs internal automation for pull requests
name: "Add metadata and labels to PRs based on context"
on:
pull_request_target:
types: [opened, labeled, unlabeled, ready_for_review, synchronize, reopened]
jobs:
shared-pulls:
runs-on: ubuntu-latest
steps:
- uses: nick-fields/private-action-loader@v3
with:
pal-repo-token: "${{ secrets.OCTAVIA_PAT }}"
pal-repo-name: airbytehq/workflow-actions@production
# the following input gets passed to the private action
token: "${{ secrets.OCTAVIA_PAT }}"
command: "pull"