From 00da3769fa4786732c051c474fa484169ed866fc Mon Sep 17 00:00:00 2001 From: mafasva <156201303+mafasva@users.noreply.github.com> Date: Wed, 17 Apr 2024 13:57:23 +0200 Subject: [PATCH] Update pipeline trigger (#548) * Update pipeline trigger * create relese PRs as draft --- .github/workflows/build-for-development.yml | 4 ++-- .github/workflows/release.yml | 15 ++------------- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build-for-development.yml b/.github/workflows/build-for-development.yml index 1720b65ef..d30457168 100644 --- a/.github/workflows/build-for-development.yml +++ b/.github/workflows/build-for-development.yml @@ -4,8 +4,8 @@ on: push: branches: [ 'feature/**', 'dependabot/**' ] pull_request_target: - branches: [ develop ] - types: [ closed ] + branches: [ develop, main ] + types: [ ready_for_review, closed ] jobs: test_and_scan: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9cd06e1de..dd7bea12c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -77,9 +77,8 @@ jobs: RELEASE_VERSION: ${{ needs.read_version.outputs.RELEASE_VERSION }} GH_TOKEN: ${{ github.token }} run: | - PR_URL=`gh pr create -B develop --title "Merge release branch '${RELEASE_VERSION}' back to develop" --body "Merge release branch '${RELEASE_VERSION}' back to develop"` + PR_URL=`gh pr create --draft -B develop --title "Merge release branch '${RELEASE_VERSION}' back to develop" --body "Merge release branch '${RELEASE_VERSION}' back to develop"` echo $PR_URL - # gh pr merge --auto --delete-branch --squash $PR_URL release: needs: read_version @@ -109,15 +108,5 @@ jobs: RELEASE_VERSION: ${{ needs.read_version.outputs.RELEASE_VERSION }} GH_TOKEN: ${{ github.token }} run: | - PR_URL=`gh pr create -B main --title "Merge release branch '${RELEASE_VERSION}'" --body "Merge release branch '${RELEASE_VERSION}'"` + PR_URL=`gh pr create --draft -B main --title "Merge release branch '${RELEASE_VERSION}'" --body "Merge release branch '${RELEASE_VERSION}'"` echo $PR_URL -# gh pr merge --auto --delete-branch --squash $PR_URL - -# wrong_branch: -# if: github.event_name == 'workflow_dispatch' && github.ref != 'refs/heads/release*' -# -# runs-on: ubuntu-latest -# -# steps: -# - name: ERROR -# run: echo 'This workflow only runs on develop branch!'