From aa43e61253720c16ab067c868d57c9e30fa25652 Mon Sep 17 00:00:00 2001 From: Naka Masato Date: Sun, 26 May 2024 20:31:51 +0900 Subject: [PATCH 1/6] Update context.yml --- .github/workflows/context.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/context.yml b/.github/workflows/context.yml index d9c0afc8..4185745b 100644 --- a/.github/workflows/context.yml +++ b/.github/workflows/context.yml @@ -31,6 +31,11 @@ jobs: echo "- github.event.pull_request.head.ref : $PR_HEAD_REF" } >> "$GITHUB_STEP_SUMMARY" + - name: branch name + run: | + branch=${{ github.head_ref || github.ref_name }} + echo "$branch" + label: runs-on: ubuntu-latest env: From 839c7d783599335ab34a6ab0819ba2a83a4ee33d Mon Sep 17 00:00:00 2001 From: Naka Masato Date: Sun, 26 May 2024 20:32:47 +0900 Subject: [PATCH 2/6] Update context.yml --- .github/workflows/context.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/context.yml b/.github/workflows/context.yml index 4185745b..74875289 100644 --- a/.github/workflows/context.yml +++ b/.github/workflows/context.yml @@ -33,7 +33,7 @@ jobs: - name: branch name run: | - branch=${{ github.head_ref || github.ref_name }} + branch="${{ github.head_ref || github.ref_name }}" echo "$branch" label: From 9fbe1f48255292c832c1570a03780a9bd11c0d0e Mon Sep 17 00:00:00 2001 From: Naka Masato Date: Sun, 26 May 2024 20:33:46 +0900 Subject: [PATCH 3/6] Update context.yml --- .github/workflows/context.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/context.yml b/.github/workflows/context.yml index 74875289..aa83f7bd 100644 --- a/.github/workflows/context.yml +++ b/.github/workflows/context.yml @@ -11,6 +11,7 @@ on: - unlabeled - closed workflow_dispatch: + push: jobs: check: From 59b98969b46ebe6c395a87f8a82767682427e86a Mon Sep 17 00:00:00 2001 From: Naka Masato Date: Sun, 26 May 2024 20:34:51 +0900 Subject: [PATCH 4/6] Update context.yml --- .github/workflows/context.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/context.yml b/.github/workflows/context.yml index aa83f7bd..56259c46 100644 --- a/.github/workflows/context.yml +++ b/.github/workflows/context.yml @@ -38,6 +38,7 @@ jobs: echo "$branch" label: + if: github.event_name == 'pull_request' runs-on: ubuntu-latest env: SKIP: 'FALSE' From 72027cd1885dcc70e10cdd75b16e31cdbdf9c77d Mon Sep 17 00:00:00 2001 From: Naka Masato Date: Sun, 26 May 2024 20:41:03 +0900 Subject: [PATCH 5/6] Update context.yml --- .github/workflows/context.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/context.yml b/.github/workflows/context.yml index 56259c46..ccdb0676 100644 --- a/.github/workflows/context.yml +++ b/.github/workflows/context.yml @@ -34,8 +34,8 @@ jobs: - name: branch name run: | - branch="${{ github.head_ref || github.ref_name }}" - echo "$branch" + tag=${{ github.event_name == 'push' && github.ref_name || github.event.pull_request.head.ref }} + echo "$tag" label: if: github.event_name == 'pull_request' From b39dd7920fffdf462fafaac07a69b0a38db5c2c7 Mon Sep 17 00:00:00 2001 From: Naka Masato Date: Sun, 26 May 2024 20:44:04 +0900 Subject: [PATCH 6/6] Update context.yml --- .github/workflows/context.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/context.yml b/.github/workflows/context.yml index ccdb0676..ff100435 100644 --- a/.github/workflows/context.yml +++ b/.github/workflows/context.yml @@ -33,9 +33,10 @@ jobs: } >> "$GITHUB_STEP_SUMMARY" - name: branch name + env: + BRANCH: ${{ github.event_name == 'push' && github.ref_name || github.event.pull_request.head.ref }} run: | - tag=${{ github.event_name == 'push' && github.ref_name || github.event.pull_request.head.ref }} - echo "$tag" + echo "$BRANCH" label: if: github.event_name == 'pull_request'