Skip to content

Sync Fork with Upstream #10

Sync Fork with Upstream

Sync Fork with Upstream #10

Workflow file for this run

name: Sync Fork with Upstream
on:
schedule:
- cron: '0 19 * * *'
workflow_dispatch:
permissions:
contents: write
jobs:
sync_latest_from_upstream:
name: Sync latest commits from upstream repo
runs-on: ubuntu-latest
if: ${{ github.event.repository.fork }}
steps:
# Step 1: run a standard checkout action
- name: Checkout target repo
uses: actions/checkout@v3
# Step 2: run the sync action
- name: Sync upstream changes
id: sync
uses: aormsby/[email protected]
with:
upstream_sync_repo: frankiejun/serv00-play
upstream_sync_branch: main
target_sync_branch: main
target_repo_token: ${{ secrets.GITHUB_TOKEN }} # automatically generated, no need to set
exclude: |
.github/workflows/sync.yml
- name: Check for errors
if: failure()
run: echo "Sync failed! Please check the logs for more details."
- name: Sync success message
if: success()
run: echo "Sync completed successfully!"