-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add github action for help-full command processing (#17502)
- Loading branch information
1 parent
d8b0563
commit c250730
Showing
2 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters