Skip to content

Fluid Earth Tera Status Check (job fails when status changes) #21323

Fluid Earth Tera Status Check (job fails when status changes)

Fluid Earth Tera Status Check (job fails when status changes) #21323

name: Fluid Earth Tera Status Check (job fails when status changes)
on:
schedule:
- cron: '38 * * * *'
workflow_dispatch:
jobs:
status-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Check if Fluid Earth Tera backend is up and up-to-date
run: $GITHUB_WORKSPACE/backend/scripts/status.js > $RUNNER_TEMP/out.txt
- uses: actions/cache/restore@v4
with:
path: ${{ runner.temp }}/previous-out.txt
key: tera-status-check-previous-output-${{ github.run_id }}
restore-keys: tera-status-check-previous-output-
- name: Print status check result and compare result with previous result
run: |
cat $RUNNER_TEMP/out.txt
diff $RUNNER_TEMP/previous-out.txt $RUNNER_TEMP/out.txt > /dev/null
- name: Prepare new result for cache
if: failure()
run: mv $RUNNER_TEMP/out.txt $RUNNER_TEMP/previous-out.txt
- name: Save new result to cache
if: failure()
uses: actions/cache/save@v4
with:
path: ${{ runner.temp }}/previous-out.txt
key: tera-status-check-previous-output-${{ github.run_id }}