mirror of
https://github.com/BX-Team/DivineMC.git
synced 2025-12-19 14:59:25 +00:00
[ci-skip] remove auto upstream update
This commit is contained in:
47
.github/workflows/upstream.yml
vendored
47
.github/workflows/upstream.yml
vendored
@@ -1,47 +0,0 @@
|
|||||||
name: Upstream Purpur
|
|
||||||
on:
|
|
||||||
workflow_dispatch: {}
|
|
||||||
schedule:
|
|
||||||
- cron: "0 0 */3 * *"
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout DivineMC Repository
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
path: 'DivineMC'
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Checkout Purpur Repository
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
path: 'Purpur'
|
|
||||||
repository: "PurpurMC/Purpur"
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Get Purpur Latest Commit Hash
|
|
||||||
id: purpurRef
|
|
||||||
run: |
|
|
||||||
ls
|
|
||||||
cd Purpur
|
|
||||||
echo "::set-output name=purpurRef::$(git rev-parse HEAD)"
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
- name: Update purpurRef in DivineMC
|
|
||||||
run: |
|
|
||||||
cd DivineMC
|
|
||||||
sed -i "s/\(purpurRef\s*=\s*\).*/\1$PAPER_REF/" gradle.properties
|
|
||||||
env:
|
|
||||||
PAPER_REF: ${{ steps.purpurRef.outputs.purpurRef }}
|
|
||||||
- name: Check for changes and Write to repository
|
|
||||||
run: |
|
|
||||||
cd DivineMC
|
|
||||||
if ! git diff --quiet; then
|
|
||||||
git add gradle.properties
|
|
||||||
git config --global user.email "action@github.com" && git config --global user.name "Github Action"
|
|
||||||
git commit -m "Updated Upstream (Purpur)"
|
|
||||||
git push
|
|
||||||
else
|
|
||||||
echo "No changes to commit."
|
|
||||||
fi
|
|
||||||
Reference in New Issue
Block a user