Skip to content

Commit

Permalink
fix: branch sync workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
stehessel committed Jun 29, 2024
1 parent 569cc79 commit 90a28f6
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/automerge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ jobs:
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
MERGE_METHOD: merge
MERGE_FILTER_AUTHOR: github-actions
MERGE_FILTER_AUTHOR: github-actions[bot]
16 changes: 14 additions & 2 deletions .github/workflows/sync-prod-from-stage.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,31 @@
name: Sync stage -> production
on:
workflow_dispatch:
permissions:
# Needed to read branches.
contents: read
# Needed to create PR's.
pull-requests: write
jobs:
sync-branches:
permissions:
pull-requests: write
runs-on: ubuntu-latest
name: Syncing branches
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Opening pull request
id: pull
# Need master for LABELS option.
uses: tretuna/sync-branches@master
uses: jdtx0/[email protected]
with:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
FROM_BRANCH: "stage"
TO_BRANCH: "production"
LABELS: '["automerge"]'
PULL_REQUEST_AUTO_MERGE_METHOD: "merge"
PULL_REQUEST_IS_DRAFT: true
16 changes: 14 additions & 2 deletions .github/workflows/sync-stage-from-master.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,31 @@
name: Sync master -> stage
on:
workflow_dispatch:
permissions:
# Needed to read branches.
contents: read
# Needed to create PR's.
pull-requests: write
jobs:
sync-branches:
permissions:
pull-requests: write
runs-on: ubuntu-latest
name: Syncing branches
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Opening pull request
id: pull
# Need master for LABELS option.
uses: tretuna/sync-branches@master
uses: jdtx0/[email protected]
with:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
FROM_BRANCH: "master"
TO_BRANCH: "stage"
LABELS: '["automerge"]'
PULL_REQUEST_AUTO_MERGE_METHOD: "merge"
PULL_REQUEST_IS_DRAFT: true

0 comments on commit 90a28f6

Please sign in to comment.