Skip to content

Sync from Upstream #162

Sync from Upstream

Sync from Upstream #162

Workflow file for this run

name: Sync from Upstream
on:
workflow_dispatch: # Allow manual trigger
schedule:
- cron: '0 0 * * *' # Run daily at midnight UTC
jobs:
sync:
runs-on: ubuntu-latest
# Grant permissions to write to contents
permissions:
contents: write
actions: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Configure Git User
run: |
git config --global user.name "GitHub Actions Sync"
git config --global user.email "actions@github.com"
- name: Add Upstream Remote
run: git remote add upstream https://github.com/digitalpalidictionary/dpd-db.git
- name: Fetch Upstream and Origin as_upstream
run: |
git fetch --depth=1 upstream main
git fetch --depth=1 origin as_upstream
- name: Push Upstream Main to Origin Main
run: |
git push --force \
https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git \
upstream/main:refs/heads/as_upstream