Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/rhobs-obs-api-sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
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: Sync with upstream/main
run: |
git fetch upstream main
git checkout -B main origin/main
git merge upstream/main
git push origin main

- name: Clean up
run: |
git remote remove upstream