From b0bc71f4635fd58270eebb25263521d03ab71107 Mon Sep 17 00:00:00 2001 From: Wainer dos Santos Moschetta Date: Thu, 17 Jun 2021 14:25:08 -0400 Subject: [PATCH] ci: test-kata-deploy: Get rid of slash-command-action action There is a problem with slash-command-action which is on absence of a slash command the job fails (instead of simply ignore, i.e., skip). This is documented on https://github.com/xt0rted/slash-command-action/issues/124. There is a workaround also documented on that issue, but here instead let's get rid of the action. In this new implementation all comments sent to the pull request are parsed, if any starts with "/test_kata-deploy" then the job is triggered. Fixes #2836 Signed-off-by: Wainer dos Santos Moschetta --- .github/workflows/kata-deploy-test.yaml | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/.github/workflows/kata-deploy-test.yaml b/.github/workflows/kata-deploy-test.yaml index a86b461eb2..febd4fbee7 100644 --- a/.github/workflows/kata-deploy-test.yaml +++ b/.github/workflows/kata-deploy-test.yaml @@ -5,26 +5,12 @@ on: name: test-kata-deploy jobs: - check_comments: - if: ${{ github.event.issue.pull_request }} - runs-on: ubuntu-latest - steps: - - name: Check for Command - id: command - uses: kata-containers/slash-command-action@v1 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - command: "test_kata_deploy" - reaction: "true" - reaction-type: "eyes" - allow-edits: "false" - permission-level: admin - - name: verify command arg is kata-deploy - run: | - echo "The command was '${{ steps.command.outputs.command-name }}' with arguments '${{ steps.command.outputs.command-arguments }}'" - create-and-test-container: - needs: check_comments + if: | + github.event.issue.pull_request + && github.event_name == 'issue_comment' + && github.event.action == 'created' + && startsWith(github.event.comment.body, '/test_kata_deploy') runs-on: ubuntu-latest steps: - name: get-PR-ref