Skip to content

Commit

Permalink
Update pipeline trigger (#548)
Browse files Browse the repository at this point in the history
* Update pipeline trigger

* create relese PRs as draft
  • Loading branch information
mafasva authored Apr 17, 2024
1 parent 93a8410 commit 00da376
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-for-development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
15 changes: 2 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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!'

0 comments on commit 00da376

Please sign in to comment.