Skip to content

Commit

Permalink
add github action for help-full command processing (#17502)
Browse files Browse the repository at this point in the history
  • Loading branch information
andriikorotkov committed Oct 4, 2022
1 parent d8b0563 commit c250730
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/help-full-command.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Run help-full command for e2e-testing-tool
on:
workflow_dispatch:
inputs:
repo:
description: "Repo to check out code from. Defaults to the main airbyte repo. Set this when building connectors from forked repos."
required: false
default: "airbytehq/airbyte"
gitref:
description: "The git ref to check out from the specified repository."
required: false
default: master
comment-id:
description: "The comment-id of the slash command. Used to update the comment with the status."
required: true
comment-body:
description: "The comment-body of the slash command. Used to run e2e-testing-tool for given command."
required: true

jobs:
help-full-run:
runs-on: ubuntu-latest
steps:
- name: Update comment for processing
uses: peter-evans/create-or-update-comment@v1
with:
comment-id: ${{ github.event.inputs.comment-id }}
reactions: eyes, rocket
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Pull Testing Tool docker image
run: docker pull airbyte/airbyte-e2e-testing-tool:latest
- name: Create input and output folders
run: |
mkdir secrets
mkdir result
- name: Run docker container with params
run: docker run -v $(pwd)/secrets:/secrets -v $(pwd)/result:/result airbyte/airbyte-e2e-testing-tool:latest ${{ github.event.inputs.comment-body }}
- name: Read file with results
id: read_file
uses: andstor/file-reader-action@v1
with:
path: "result/log"
- name: Add Success Comment
if: needs.set-params.outputs.comment-id && success()
uses: peter-evans/create-or-update-comment@v1
with:
comment-id: ${{ github.event.inputs.comment-id }}
body: |
> :white_check_mark: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
${{ steps.read_file.outputs.contents }}
reactions: +1
- name: Add Failure Comment
if: needs.set-params.outputs.comment-id && failure()
uses: peter-evans/create-or-update-comment@v1
with:
comment-id: ${{ github.event.inputs.comment-id }}
body: |
> :x: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
reactions: -1
2 changes: 2 additions & 0 deletions .github/workflows/slash-commands.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,12 @@ jobs:
publish-cdk
gke-kube-test
run-specific-test
help-full
static-args: |
repo=${{ steps.getref.outputs.repo }}
gitref=${{ steps.getref.outputs.ref }}
comment-id=${{ github.event.comment.id }}
comment-body=${{ github.event.comment.body }}
dispatch-type: workflow

- name: Edit comment with error message
Expand Down

0 comments on commit c250730

Please sign in to comment.