57 lines
1.8 KiB
YAML
57 lines
1.8 KiB
YAML
name: Slash Command Dispatch
|
|
on:
|
|
issue_comment:
|
|
types: [created]
|
|
jobs:
|
|
slashCommandDispatch:
|
|
# Only allow slash commands on pull request (not on issues)
|
|
if: ${{ github.event.issue.pull_request }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout Airbyte
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Check PAT rate limits
|
|
run: |
|
|
./tools/bin/find_non_rate_limited_PAT \
|
|
${{ secrets.AIRBYTEIO_PAT }} \
|
|
${{ secrets.OSS_BUILD_RUNNER_GITHUB_PAT }} \
|
|
${{ secrets.SUPERTOPHER_PAT }} \
|
|
${{ secrets.DAVINCHIA_PAT }}
|
|
|
|
- name: Get PR repo and ref
|
|
id: getref
|
|
run: |
|
|
pr_info="$(curl ${{ github.event.issue.pull_request.url }})"
|
|
echo ref="$(echo $pr_info | jq -r '.head.ref')" >> $GITHUB_OUTPUT
|
|
echo repo="$(echo $pr_info | jq -r '.head.repo.full_name')" >> $GITHUB_OUTPUT
|
|
|
|
- name: Slash Command Dispatch
|
|
id: scd
|
|
uses: peter-evans/slash-command-dispatch@v2
|
|
with:
|
|
token: ${{ env.PAT }}
|
|
commands: |
|
|
test
|
|
test-performance
|
|
build-connector
|
|
publish-connector
|
|
publish
|
|
publish-external
|
|
publish-cdk
|
|
gke-kube-test
|
|
run-specific-test
|
|
static-args: |
|
|
repo=${{ steps.getref.outputs.repo }}
|
|
gitref=${{ steps.getref.outputs.ref }}
|
|
comment-id=${{ github.event.comment.id }}
|
|
dispatch-type: workflow
|
|
|
|
- name: Edit comment with error message
|
|
if: steps.scd.outputs.error-message
|
|
uses: peter-evans/create-or-update-comment@v1
|
|
with:
|
|
comment-id: ${{ github.event.comment.id }}
|
|
body: |
|
|
> Error: ${{ steps.scd.outputs.error-message }}
|