WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Sync Fork

Sync Fork #256

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/api
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
- name: Add upstream repository
run: |
git remote add upstream https://github.com/observatorium/api
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