From 37941df3bcc155c885ff11c61136282956dc5ce0 Mon Sep 17 00:00:00 2001 From: Mateusz Urbanek Date: Thu, 28 Nov 2024 09:26:01 +0100 Subject: [PATCH] ci: add reaction action Signed-off-by: Mateusz Urbanek --- .github/workflows/command.yaml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/command.yaml b/.github/workflows/command.yaml index e252b81..c591103 100644 --- a/.github/workflows/command.yaml +++ b/.github/workflows/command.yaml @@ -1,4 +1,4 @@ -name: Trigger CI on Comment +name: command on: issue_comment: @@ -16,16 +16,19 @@ jobs: pull-requests: write steps: + - uses: dkershner6/reaction-action@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} - uses: actions/checkout@v4 with: fetch-depth: 0 - uses: fregante/setup-git-user@v2 - id: extract_info - env: - GH_TOKEN: ${{ github.token }} run: | ./hack/comment.sh "${{ github.event.comment.body }}" "${GITHUB_ENV}" - - run: | + - env: + GH_TOKEN: ${{ github.token }} + run: | PR_NUMBER=${{ github.event.issue.number }} BRANCH_NAME=$(gh pr view $PR_NUMBER --json headRefName --jq '.headRefName') git fetch origin $BRANCH_NAME