Skip to content

Check newest Oldschool cache id #376

Check newest Oldschool cache id

Check newest Oldschool cache id #376

Workflow file for this run

name: Check newest Oldschool cache id
on:
schedule:
- cron: 0 12 * * 3 # Every Wednesday at 12:00 UTC
- cron: 0 */6 * * * # Every 6 hours
workflow_dispatch:
jobs:
fetch-and-dispatch:
runs-on: ubuntu-latest
permissions:
actions: write
contents: read
outputs:
cache_id: ${{ steps.fetch.outputs.cache_id }}
steps:
- name: Fetch latest cache id
id: fetch
run: |
set -e
data=$(curl -s https://archive.openrs2.org/caches.json)
id=$(echo "$data" | jq '[.[] | select(.game=="oldschool" and .environment=="live" and .language=="en") | .id] | max')
if [ -z "$id" ] || [ "$id" = "null" ]; then
echo "No matching cache id found"
exit 1
fi
echo "cache_id=$id" >> "$GITHUB_OUTPUT"
call-workflow:
needs: fetch-and-dispatch
uses: ./.github/workflows/update-dumps.yml

Check failure on line 31 in .github/workflows/check-cache.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/check-cache.yml

Invalid workflow file

error parsing called workflow ".github/workflows/check-cache.yml" -> "./.github/workflows/update-dumps.yml" (source branch with sha:84fd171da847f3adc5f58fe6c190e8bb46b39850) : (Line: 502, Col: 14): Unexpected symbol: '$job'. Located at position 7 within expression: needs.$job.result, (Line: 576, Col: 14): Unexpected symbol: '$job'. Located at position 7 within expression: needs.$job.result
with:
cache_version: ${{ needs.fetch-and-dispatch.outputs.cache_id }}