Fluid Earth Tera Status Check (job fails when status changes) #21894
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |