mirror of https://github.com/djteang/OrangeTV.git
parent
c4d1d33933
commit
2552d6e605
|
|
@ -2,42 +2,16 @@ name: Sync Fork
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 */6 * * *' # Runs every day at midnight UTC
|
- cron: '0 */6 * * *'
|
||||||
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
sync:
|
sync:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Fork
|
- name: Sync upstream changes
|
||||||
uses: actions/checkout@v3
|
uses: dabreadman/fork-sync-with-upstream-action@v1
|
||||||
with:
|
with:
|
||||||
# Using a personal access token is recommended for pushing changes.
|
upstream_repository: djteang/OrangeTV
|
||||||
# The GITHUB_TOKEN has restricted permissions.
|
target_branch: main
|
||||||
token: ${{ secrets.GH_PAT }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
fetch-depth: 0 # Fetches all history for all branches and tags
|
|
||||||
|
|
||||||
- name: Set up Git
|
|
||||||
run: |
|
|
||||||
git config --global user.name "${{ github.actor }}"
|
|
||||||
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
|
|
||||||
|
|
||||||
- name: Add Upstream Remote
|
|
||||||
run: git remote add upstream https://github.com/djteang/OrangeTV.git
|
|
||||||
|
|
||||||
- name: Fetch Upstream
|
|
||||||
run: git fetch upstream
|
|
||||||
|
|
||||||
- name: Sync main Branch
|
|
||||||
run: |
|
|
||||||
git checkout main
|
|
||||||
git merge upstream/main
|
|
||||||
git push origin main
|
|
||||||
|
|
||||||
# Repeat for other branches you want to sync
|
|
||||||
# - name: Sync develop Branch
|
|
||||||
# run: |
|
|
||||||
# git checkout develop
|
|
||||||
# git merge upstream/develop
|
|
||||||
# git push origin develop
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue