39 lines
903 B
YAML
39 lines
903 B
YAML
name: Upstream Sync
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
on:
|
|
schedule:
|
|
- cron: "0 0 * * 0"
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
sync_latest_from_upstream:
|
|
name: Sync latest commits from upstream repo
|
|
runs-on: ubuntu-latest
|
|
|
|
if: ${{ github.event.repository.fork }}
|
|
|
|
steps:
|
|
- name: Checkout target repo
|
|
uses: actions/checkout@v4
|
|
with:
|
|
ref: master
|
|
fetch-depth: 0
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Sync upstream changes
|
|
run: |
|
|
git config --global user.name "github-actions[bot]"
|
|
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
|
|
git remote add upstream https://github.com/alexta69/metube.git
|
|
|
|
git fetch upstream
|
|
|
|
git checkout master
|
|
|
|
git merge upstream/master --allow-unrelated-histories
|
|
|
|
git push origin master
|