Skip to content

Workflow file for this run

name: CI
on:
workflow_dispatch:
schedule:
- cron: "0 16 * * *"
jobs:
check:
permissions: write-all
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Should build?
id: should_build
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if ! git checkout origin/update build.md; then
echo "first time building!"
echo "SHOULD_BUILD=1" >> $GITHUB_OUTPUT
else
UPDATE_CFG=$(./build.sh config.toml --config-update)
if [ "$UPDATE_CFG" ]; then
echo "'$UPDATE_CFG'"
echo "SHOULD_BUILD=1" >> $GITHUB_OUTPUT
else
echo "SHOULD_BUILD=0" >> $GITHUB_OUTPUT
fi
fi
- name: Clear older runs
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh run list -L400 --json databaseId -q '.[].databaseId' | tail -n+10 | xargs -IID gh api "repos/$GITHUB_REPOSITORY/actions/runs/ID" -X DELETE || :
outputs:
SHOULD_BUILD: ${{ steps.should_build.outputs.SHOULD_BUILD }}
build:
permissions: write-all
needs: check
uses: ./.github/workflows/build.yml

Check failure on line 48 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yml

Invalid workflow file

error parsing called workflow ".github/workflows/ci.yml" -> "./.github/workflows/build.yml" (source branch with sha:0be5664b5b4ffc470273d2a3b2ad73d196ab5276) : workflow is not reusable as it is missing a `on.workflow_call` trigger
if: ${{ needs.check.outputs.SHOULD_BUILD == 1 }}
secrets: inherit