Skip to content

ci: Improve gitflow process #7019

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .github/workflows/gitflow-sync-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ on:
workflow_dispatch:

env:
DEV_BRANCH: develop
SOURCE_BRANCH: master
TAGRET_BRANCH: develop

jobs:
main:
Expand All @@ -29,9 +30,10 @@ jobs:
id: open-pr
uses: repo-sync/pull-request@v2
with:
destination_branch: ${{ env.DEV_BRANCH }}
pr_title: '[Gitflow] Merge ${{ github.ref_name }} into ${{ env.DEV_BRANCH }}'
pr_body: 'Merge ${{ github.ref_name }} branch into ${{ env.DEV_BRANCH }}'
source_branch: ${{ env.SOURCE_BRANCH }}
destination_branch: ${{ env.TARGET_BRANCH }}
pr_title: '[Gitflow] Merge ${{ env.SOURCE_BRANCH }} into ${{ env.TARGET_BRANCH }}'
pr_body: 'Merge ${{ env.SOURCE_BRANCH }} branch into ${{ env.TARGET_BRANCH }}'
pr_label: 'Dev: Gitflow'

# https://github.com/marketplace/actions/enable-pull-request-automerge
Expand All @@ -44,6 +46,8 @@ jobs:

# https://github.com/marketplace/actions/auto-approve
- name: Auto approve PR
# Always skip this for now, until we got a proper bot setup
if: steps.open-pr.outputs.pr_number != '' || 1 == 2
uses: hmarr/auto-approve-action@v3
with:
pull-request-number: ${{ steps.open-pr.outputs.pr_number }}
Expand Down
19 changes: 9 additions & 10 deletions .github/workflows/gitflow-sync-master.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
name: Gitflow - Sync develop into master
on:
push:
branches:
- develop
paths:
# We want to trigger this when ONLY the changlog is changed on develop, but nothing else
- 'CHANGELOG.md'
- '!packages'
- '!**/*.js'
- '!**/*.json'
- '!**/*.ts'
workflow_dispatch:
pull_request:
- types: [closed]
- branches:
- 'develop'

env:
MAIN_BRANCH: master
Expand All @@ -19,6 +13,9 @@ jobs:
main:
name: Create PR develop->master
runs-on: ubuntu-20.04
if: |
github.event.pull_request.merged == true
&& startsWith(github.event.pull_request.title, "meta(changelog):")
permissions:
pull-requests: write
contents: write
Expand Down Expand Up @@ -46,6 +43,8 @@ jobs:

# https://github.com/marketplace/actions/auto-approve
- name: Auto approve PR
# Always skip this for now, until we got a proper bot setup
if: steps.open-pr.outputs.pr_number != '' || 1 == 2
uses: hmarr/auto-approve-action@v3
with:
pull-request-number: ${{ steps.open-pr.outputs.pr_number }}
Expand Down