35 lines
982 B
YAML
35 lines
982 B
YAML
name: Sync fork with upstream
|
|
run-name: Sync fork with upstream
|
|
on:
|
|
schedule:
|
|
- cron: "@daily"
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
sync:
|
|
name: Sync
|
|
runs-on: Misc
|
|
steps:
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
depth: 0
|
|
token: ${{ secrets.PUSH_TOKEN }}
|
|
- name: Add upstream remote
|
|
run: git remote add upstream ${{ github.server_url }}/mirror/libcamera
|
|
- name: Status
|
|
run: git status
|
|
- name: Fetch upstream changes
|
|
run: git fetch upstream
|
|
- name: Status
|
|
run: git status
|
|
- name: Checkout to branch
|
|
run: git switch ${{ github.ref_name }}
|
|
- name: Status
|
|
run: git status
|
|
- name: Status
|
|
run: git remote get-url --all upstream
|
|
- name: Rebase changes
|
|
run: git rebase --strategy recursive --strategy-option theirs upstream/master || git status
|
|
- name: Push changes
|
|
run: git push --force
|