Skip to content

Sync Fork with Upstream #28

Sync Fork with Upstream

Sync Fork with Upstream #28

name: Sync Fork with Upstream
on:
schedule:
# Check for updates daily at 2 AM UTC
- cron: '0 2 * * *'
workflow_dispatch:
jobs:
sync-fork:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: master
- name: Setup Git User
run: |
git config --global user.name "GitHub Actions Bot"
git config --global user.email "actions@github.com"
- name: Add upstream repository
run: |
git remote add upstream https://github.com/golang/go.git
git fetch upstream
- name: Sync fork with upstream
run: |
# Merge upstream changes
git merge upstream/master --no-edit
# Push changes to fork's master branch
git push origin master