From 662ed38fcc6f87b5a68ff2a76d5c48967fd4f38c Mon Sep 17 00:00:00 2001 From: Irene Ryu Date: Tue, 2 Apr 2024 17:55:40 +0900 Subject: [PATCH] Another trial --- .github/workflows/package-publish.yml | 3 --- .github/workflows/release-ticket-creation.yml | 11 +++++------ 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/package-publish.yml b/.github/workflows/package-publish.yml index 4d17e277c..0f95a99ce 100644 --- a/.github/workflows/package-publish.yml +++ b/.github/workflows/package-publish.yml @@ -5,9 +5,6 @@ on: version: description: 'Target version' required: true - push: - branches: - - 'feat/AC-1856' jobs: publish: diff --git a/.github/workflows/release-ticket-creation.yml b/.github/workflows/release-ticket-creation.yml index 6847fa7b4..361c026fe 100644 --- a/.github/workflows/release-ticket-creation.yml +++ b/.github/workflows/release-ticket-creation.yml @@ -5,9 +5,6 @@ on: branch_name: description: 'Type a branch name starting with `release/v`' required: true - push: - branches: - - 'feat/AC-1856' jobs: trigger-release-ticket-creation: @@ -30,15 +27,17 @@ jobs: set -x set -o pipefail branch_name="${{ github.event.inputs.branch_name }}" - git ls-remote --exit-code --heads origin "$branch_name" | grep -q "$branch_name" - if [[ ${PIPESTATUS[1]} -eq 0 ]]; then + git ls-remote --exit-code --heads origin "$branch_name" | grep "$branch_name" || false + echo ${PIPESTATUS[0]} + echo ${PIPESTATUS[1]} + if [[ ${PIPESTATUS[0]} -eq 0 ]]; then echo "BRANCH_EXISTS=true" >> $GITHUB_ENV else echo "BRANCH_EXISTS=false" >> $GITHUB_ENV fi - name: Create branch if it doesn't exist - if: steps.check_branch.outputs.branch_exists == 1 + if: github.env.BRANCH_EXISTS == 'false' run: | branch_name="${{ github.event.inputs.branch_name }}" git checkout -b "$branch_name"