Skip to content

Sync Fork with Upstream #230

Sync Fork with Upstream

Sync Fork with Upstream #230

Workflow file for this run

name: Sync Fork with Upstream
on:
schedule:
- cron: '0 0 * * *'
push:
branches:
- main
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout Fork Repository
uses: actions/checkout@v3
with:
ref: main
- name: Add Upstream Remote
run: git remote add upstream https://github.com/COS301-SE-2024/ECHO.git
- name: Fetch Upstream Changes
run: git fetch upstream
- name: Set Up Git Identity
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Merge Upstream Changes
run: git merge upstream/main --allow-unrelated-histories
- name: Push Changes to Fork
run: git push origin main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}