mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-15 13:04:36 +00:00
Create sync-upstream.yml
This commit is contained in:
parent
95031338bf
commit
b0f003fd58
1 changed files with 38 additions and 0 deletions
38
.github/workflows/sync-upstream.yml
vendored
Normal file
38
.github/workflows/sync-upstream.yml
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
name: Sync Upstream
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 * * * *" # Her saat başı çalışır
|
||||
workflow_dispatch: # İstersen elle de çalıştırabilirsin
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
sync:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout fork
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Configure Git
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
|
||||
- name: Add upstream
|
||||
run: git remote add upstream https://github.com/MCCTeam/Minecraft-Console-Client.git
|
||||
|
||||
- name: Fetch upstream
|
||||
run: git fetch upstream
|
||||
|
||||
- name: Merge upstream (upstream wins conflicts)
|
||||
run: |
|
||||
git checkout master
|
||||
git merge upstream/master -X theirs --no-edit
|
||||
|
||||
- name: Push changes
|
||||
run: git push origin master
|
||||
Loading…
Add table
Add a link
Reference in a new issue