Skip to content

test

test #16

Workflow file for this run

name: pr-comments
on:
issue_comment:
types:
- created
permissions:
contents: read
pull-requests: write
actions: write
jobs:
trigger:
runs-on: ubuntu-latest
if: ${{ github.event.issue.pull_request && startsWith(github.event.comment.body, '/plan') }}
steps:
- name: Create reaction
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# https://docs.github.com/ja/rest/reactions/reactions?apiVersion=2022-11-28#create-reaction-for-an-issue-comment
# needs pull_requests:write permission
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/repos/${{ github.repository }}/issues/comments/${{ github.event.comment.id }}/reactions \
-f content='rocket'
- uses: actions/checkout@v4
- uses: aquaproj/aqua-installer@v2.3.0
with:
aqua_version: v2.21.0
- name: trigger
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
BRANCH_NAME=$(gh pr view --json headRefName --jq .headRefName ${{ github.event.issue.number }})
github-comment exec -- gh workflow run -f pull-request-number=${{ github.event.issue.number }} --ref ${BRANCH_NAME} test.yaml