From eea1b74f1913cc47a0628703185fee3b3ebb5762 Mon Sep 17 00:00:00 2001 From: Hiroyuki Kusu Date: Wed, 29 Nov 2023 09:42:47 +0900 Subject: [PATCH] Update CI Apply merge queue. --- .github/workflows/ci.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a30f1f9..29b66c0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,8 +2,7 @@ name: CI on: pull_request: - push: - branches: [main] + merge_group: jobs: check: @@ -19,9 +18,19 @@ jobs: steps: - name: Check out uses: actions/checkout@v4 + - name: Dump GitHub context + env: + GITHUB_CONTEXT: ${{ toJson(github) }} + run: echo "$GITHUB_CONTEXT" + - name: Get PR number + id: pr-number + if: github.event_name == 'merge_group' + shell: bash # for windlows + run: echo "number=$(echo '${{ github.ref }}' | awk '{gsub(/^.*pr-|-.*$/,"")}1')" >> "$GITHUB_OUTPUT" - name: Use this action uses: ./ with: comment: 'CI ( ${{ matrix.runner }} ) passed. ref: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' previous-comment: 'hide' grouping-key: ${{ matrix.runner }}-${{ github.workflow }}-${{ github.job }} + pull-request-number: ${{ github.event.pull_request.number || steps.pr-number.outputs.number }}