From cca105b0b4bef35f43a10daa4c832919b21024bc Mon Sep 17 00:00:00 2001 From: atsuyaw <68371029+atsuyaw@users.noreply.github.com> Date: Wed, 23 Oct 2024 11:18:23 +0900 Subject: [PATCH] fix: Modify condition --- .github/workflows/release.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0d5dc15c..bd2889c4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,7 @@ jobs: outputs: updCont: ${{ steps.updCont.outputs.any_changed }} dev: ${{ steps.dev.outputs.any_changed }} - PRexist: ${{ steps.PRexist.outputs.cnt }} + existPR: ${{ steps.existPR.outputs.cnt }} steps: - uses: actions/checkout@v4 - name: Check updCont @@ -36,24 +36,20 @@ jobs: !content/** !data/** - name: Check exist PR - id: PRexist + id: existPR run: | - echo "cnt= \ - $(gh pr list --search \ - --base "main" \ - --head "${{ github.ref_name }}" \ - --state "open" \ - | wc -l)" >> $GITHUB_OUTPUT + echo "cnt=$(gh pr list -B main -H ${{ github.ref_name }} | wc -l)" \ + >> $GITHUB_OUTPUT createPR: runs-on: ubuntu-22.04 needs: - get-changes permissions: pull-requests: write - if: needs.PRexist.outputs.cnt == 0 steps: - uses: actions/checkout@v4 - name: Create PR + if: needs.get-changes.outputs.existPR == 0 env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: |