From 2160c8e998e23cb0a2cee38e4f030a743d61af29 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Mon, 2 Oct 2023 14:09:29 -0600 Subject: [PATCH] chore: create issue-comment-test.yml (#1624) --- .github/workflows/issue-comment-test.yml | 66 ++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 .github/workflows/issue-comment-test.yml diff --git a/.github/workflows/issue-comment-test.yml b/.github/workflows/issue-comment-test.yml new file mode 100644 index 00000000..d5eab243 --- /dev/null +++ b/.github/workflows/issue-comment-test.yml @@ -0,0 +1,66 @@ +name: Issue Comment Test +on: + issue_comment: + +jobs: + pr_commented: + # This job only runs for pull request comments + name: PR comment + if: ${{ github.event.issue.pull_request }} + runs-on: ubuntu-latest + steps: + - run: | + echo A comment on PR $NUMBER + env: + NUMBER: ${{ github.event.issue.number }} + + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: true + + - name: Dump GitHub context + env: + GITHUB_CONTEXT: ${{ toJson(github) }} + run: echo "$GITHUB_CONTEXT" + + - name: Run changed-files with defaults + id: changed-files + uses: ./ + + - name: Show output + run: | + echo '${{ toJSON(steps.changed-files.outputs) }}' + shell: + bash + + issue_commented: + # This job only runs for issue comments + name: Issue comment + if: ${{ !github.event.issue.pull_request }} + runs-on: ubuntu-latest + steps: + - run: | + echo A comment on issue $NUMBER + env: + NUMBER: ${{ github.event.issue.number }} + + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: true + + - name: Dump GitHub context + env: + GITHUB_CONTEXT: ${{ toJson(github) }} + run: echo "$GITHUB_CONTEXT" + + - name: Run changed-files with defaults + id: changed-files + uses: ./ + + - name: Show output + run: | + echo '${{ toJSON(steps.changed-files.outputs) }}' + shell: + bash \ No newline at end of file