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 3460b7d
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
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 3460b7d

Please sign in to comment.