Sync Fork #9
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: Sync Fork | |
on: | |
schedule: | |
- cron: '0 0 * * *' #every 24h | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
sync: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout your forked repository | |
uses: actions/checkout@v4 | |
with: | |
repository: rhobs/rhobs-thanos-operator | |
token: ${{ secrets.GITHUB_TOKEN }} | |
fetch-depth: 0 | |
- name: Add upstream repository | |
run: | | |
git remote add upstream https://github.com/thanos-community/thanos-operator | |
git fetch upstream | |
- name: Set up Git identity | |
run: | | |
git config user.name "GitHub Actions Bot" | |
git config user.email "[email protected]" | |
- name: Sync with upstream/main | |
run: | | |
git fetch upstream main | |
git checkout -B synced-main origin/synced-main | |
git merge upstream/main | |
git push origin synced-main | |
- name: Clean up | |
run: | | |
git remote remove upstream |