Skip to content

Sync branches

Sync branches #61

Workflow file for this run

name: 'Sync branches'
on:
schedule:
- cron: '0 0 * * 1' # Run at the start of every monday
workflow_dispatch: # Allow manually invoking this workflow
permissions: {}
env:
base_branch: 'origin/main'
jobs:
sync-branch:
if: github.repository == 'dotnet/dotnet-monitor'
strategy:
matrix:
branch: ["release/6.x", "release/7.x", "release/7.2"]
name: 'Sync ${{ matrix.branch }}'
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
with:
persist-credentials: true # We need to persist credentials to push the resulting changes upstream.
fetch-depth: 0 # Fetch the entire repo for the below git operations
ref: ${{ matrix.branch }}
- name: Sync branch
run: |
git checkout "$base_branch" -- \
".github" \
".devcontainer" \
".vscode" \
"eng/actions" \
"cspell.json" \
"documentation/**.md"
- name: Open PR
uses: ./.github/actions/open-pr
with:
files_to_commit: "*"
title: '[${{ matrix.branch }}] Sync branch with ${{ env.base_branch }}'
commit_message: sync branch with ${{ env.base_branch }}
body: Sync branch with ${{ env.base_branch }}. This PR was auto generated and will not be automatically merged in.
branch_name: sync/${{ matrix.branch }}
fail_if_files_unchanged: false
labels: 'automatic-pr'
auth_token: ${{ secrets.GITHUB_TOKEN }}