mirror of
https://github.com/SparklyPower/SparklyPaper.git
synced 2025-12-27 02:49:06 +00:00
First commit! 🎉
This commit is contained in:
44
.github/workflows/auto-update.yml
vendored
Normal file
44
.github/workflows/auto-update.yml
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
name: Automatically update Paper commit hash
|
||||
on:
|
||||
workflow_dispatch: {}
|
||||
schedule:
|
||||
- cron: "0 0 * * *"
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout SparklyPaper Repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: 'SparklyPaper'
|
||||
token: ${{ secrets.LORITTA_PAT }}
|
||||
|
||||
- name: Checkout Paper Repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: 'Paper'
|
||||
repository: "PaperMC/Paper"
|
||||
token: ${{ secrets.LORITTA_PAT }}
|
||||
|
||||
- name: Get Paper Latest Commit Hash
|
||||
id: paperRef
|
||||
run: |
|
||||
ls
|
||||
cd Paper
|
||||
echo "::set-output name=paperRef::$(git rev-parse HEAD)"
|
||||
cd ..
|
||||
|
||||
- name: Update paperRef in SparklyPaper
|
||||
run: |
|
||||
sed -i "s/\paperRef=.*/paperRef=$PAPER_REF/" SparklyPaper/gradle.properties
|
||||
env:
|
||||
PAPER_REF: ${{ steps.paperRef.outputs.paperRef }}
|
||||
|
||||
- name: Write to repository
|
||||
run: |
|
||||
cd SparklyPaper
|
||||
git add gradle.properties
|
||||
git config user.name "Loritta Morenitta"
|
||||
git config user.email 47356322+LorittaMorenitta@users.noreply.github.com
|
||||
git commit -m "Updated Upstream (Paper)"
|
||||
git push
|
||||
Reference in New Issue
Block a user