Skip to content

Sync Fork with Upstream #74

Sync Fork with Upstream

Sync Fork with Upstream #74

Workflow file for this run

name: Sync Fork with Upstream
on:
schedule:
- cron: '0 0 * * *' # Runs every day at midnight UTC
workflow_dispatch: # Allows manual triggering
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
- name: Set up Git
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
- name: Add upstream remote
run: |
git remote add upstream https://github.com/device-management-toolkit/console.git || true
- name: Fetch upstream
run: git fetch upstream
- name: Merge upstream/main
run: git merge upstream/main --allow-unrelated-histories --no-edit
- name: Push changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: git push origin main