Skip to content

chore: update permissions and simplify token usage in sync-branches w… #3

chore: update permissions and simplify token usage in sync-branches w…

chore: update permissions and simplify token usage in sync-branches w… #3

Workflow file for this run

name: Sync Main to Staging
on:
push:
branches:
- main
permissions:
contents: write
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout staging branch
uses: actions/checkout@v3
with:
ref: staging
# The GITHUB_TOKEN is automatically used here due to the `permissions` key
- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Merge main into staging
run: |
git pull origin main
git push origin staging