diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9bcaf269..fee3bdd9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,9 +27,6 @@ jobs: files: | content/** data/** - - name: Output updCont - run: | - echo ${{ steps.updCont.outputs.any_changed }} - name: Check dev uses: tj-actions/changed-files@v45 id: dev @@ -38,14 +35,29 @@ jobs: files: | !content/** !data/** - - name: Output dev + check-existPR: + runs-on: ubuntu-22.04 + outputs: + PRexist: ${{ steps.PRexist.outputs.cnt }} + steps: + - uses: actions/checkout@v4 + - name: Check exist PR + id: PRexist run: | - echo ${{ steps.dev.outputs.any_changed }} + echo "cnt= \ + $(gh pr list --search \ + --base "main" \ + --head "${{ github.ref_name }}" \ + --state "open" \ + | wc -l)" >> $GITHUB_OUTPUT createPR: runs-on: ubuntu-22.04 permissions: pull-requests: write if: ${{ github.event_name }} == 'create' + needs: + - check-existPR + if: needs.existPR.outputs.cnt != 0 steps: - uses: actions/checkout@v4 - name: Create PR