Skip to content

Sync with Upstream

Sync with Upstream #40

Workflow file for this run

name: Sync with Upstream
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: setup
run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
- name: merge upstream
run: |
git remote add upstream https://git.eaglercraft.rip/eaglercraft/eaglercraft-builds.git
git fetch upstream
git checkout main
git merge upstream/main --strategy-option=theirs --allow-unrelated-histories
- name: add workflow
run: |
git reset HEAD .github/workflows/
git checkout HEAD -- .github/workflows/
if git diff --quiet; then
echo "No changes in .github/workflows/ to commit."
else
git commit -m "Hold Workflows"
fi
- name: push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main