From 27433b61652cd104cb2dde0b1c2afe388bcd85d1 Mon Sep 17 00:00:00 2001 From: Naka Masato Date: Mon, 25 Nov 2024 07:23:40 +0900 Subject: [PATCH 1/2] Update workflow-run.yaml --- .github/workflows/workflow-run.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/workflow-run.yaml b/.github/workflows/workflow-run.yaml index f87991d0..4321c514 100644 --- a/.github/workflows/workflow-run.yaml +++ b/.github/workflows/workflow-run.yaml @@ -5,7 +5,7 @@ on: workflow_run: workflows: [test-job] types: - - requested + - in_progress - completed jobs: test-job: @@ -14,7 +14,7 @@ jobs: - name: "Determine action ${{ github.event.action }}" id: determine-action run: | - if [[ "${{ github.event.action }}" == "requested" ]];then + if [[ "${{ github.event.action }}" == "in_progress" ]];then echo "action=start" >> "$GITHUB_OUTPUT" else echo "action=stop" >> "$GITHUB_OUTPUT" From 31578388a110dc568880e59adf41f86a8fa04806 Mon Sep 17 00:00:00 2001 From: Naka Masato Date: Mon, 25 Nov 2024 07:26:20 +0900 Subject: [PATCH 2/2] Update workflow-run.yaml --- .github/workflows/workflow-run.yaml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/workflow-run.yaml b/.github/workflows/workflow-run.yaml index 4321c514..4e5c73da 100644 --- a/.github/workflows/workflow-run.yaml +++ b/.github/workflows/workflow-run.yaml @@ -1,27 +1,22 @@ name: workflow-run on: - pull_request: workflow_run: - workflows: [test-job] + workflows: [pull-request-and-push-to-main] types: - - in_progress + - requested - completed jobs: - test-job: + run: runs-on: ubuntu-latest steps: - name: "Determine action ${{ github.event.action }}" id: determine-action run: | - if [[ "${{ github.event.action }}" == "in_progress" ]];then + if [[ "${{ github.event.action }}" == "requested" ]];then echo "action=start" >> "$GITHUB_OUTPUT" else echo "action=stop" >> "$GITHUB_OUTPUT" fi - name: "echo ${{ github.event.action }} ${{ steps.determine-action.outputs.action }}" run: echo "${{ steps.determine-action.outputs.action }}" - other-job: - runs-on: ubuntu-latest - steps: - - run: echo running