Repo Sync #112301
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Repo Sync | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "*/5 * * * *" | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
repo-sync: | |
name: Synchronize repositories | |
if: ${{ github.repository == 'splunk/public-o11y-docs' || github.repository == 'splunk/private-o11y-docs' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: repo-sync/github-sync@v2 | |
name: Sync repo to branch | |
with: | |
source_repo: ${{ secrets.SOURCE_REPO }} | |
source_branch: main | |
destination_branch: ${{ secrets.INTERMEDIATE_BRANCH }} | |
github_token: ${{ secrets.MY_TOKEN }} | |
- uses: repo-sync/pull-request@v2 | |
name: Create pull request | |
with: | |
source_branch: ${{ secrets.INTERMEDIATE_BRANCH }} | |
destination_branch: main | |
pr_title: "Pulling ${{ github.ref }} into main" | |
pr_label: "sync" | |
github_token: ${{ secrets.MY_TOKEN }} |