Skip to content

Always Up To Date #12189

Always Up To Date

Always Up To Date #12189

Workflow file for this run

name: Always Up To Date
on:
workflow_dispatch:
schedule:
- cron: "*/10 * * * *"
jobs:
upstream:
name: Update Upstream
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 21
- name: Determine if update is required
id: check
run: echo "needs=$(./gradlew -q checkNeedsUpdate)" >> $GITHUB_OUTPUT
- name: Configure Git
if: steps.check.outputs.needs == 'true'
run: git config --global user.email "[email protected]" && git config --global user.name "Github Action"
- name: Update upstream
if: steps.check.outputs.needs == 'true'
run: ./gradlew updateUpstream
- name: Apply patches
if: steps.check.outputs.needs == 'true'
run: ./gradlew applyPatches
- name: Check build
if: steps.check.outputs.needs == 'true'
run: ./gradlew build
- name: Commit changes
if: steps.check.outputs.needs == 'true'
run: git add . && printf "Updated Upstream (Plazma)\n\nUpstream has released updates that appear to apply and compile correctly\n\n$(cat compare.txt)" | git commit -F -
- name: Push changes
if: steps.check.outputs.needs == 'true'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}