diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 46d9242..6eff1df 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,7 +3,21 @@ name: CI on: push: branches: [main] + # Prose cannot break a build. Provider JSON can, so it is NOT ignored — + # the last step here fails if any providers/*.json stops parsing. + paths-ignore: + - '**/*.md' + - 'docs/**' + - 'demo/**' + - '.gitignore' + - 'LICENSE' pull_request: + paths-ignore: + - '**/*.md' + - 'docs/**' + - 'demo/**' + - '.gitignore' + - 'LICENSE' workflow_dispatch: concurrency: diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 9664618..406076a 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -4,7 +4,19 @@ on: push: branches: [main] tags: ['v*.*.*'] + paths-ignore: + - '**/*.md' + - 'docs/**' + - 'demo/**' + - '.gitignore' + - 'LICENSE' pull_request: + paths-ignore: + - '**/*.md' + - 'docs/**' + - 'demo/**' + - '.gitignore' + - 'LICENSE' workflow_dispatch: env: @@ -29,6 +41,8 @@ jobs: - uses: actions/checkout@v4 - name: Set up QEMU + # Only needed to cross-build arm64, which only tagged releases do. + if: startsWith(github.ref, 'refs/tags/') uses: docker/setup-qemu-action@v3 - name: Set up Buildx @@ -65,7 +79,9 @@ jobs: uses: docker/build-push-action@v6 with: context: . - platforms: linux/amd64,linux/arm64 + # Multi-arch on releases; native-only otherwise, since emulating + # arm64 is most of the build time and nothing consumes it per-commit. + platforms: ${{ startsWith(github.ref, 'refs/tags/') && 'linux/amd64,linux/arm64' || 'linux/amd64' }} push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/README.md b/README.md index 3311d01..7e1b660 100644 --- a/README.md +++ b/README.md @@ -486,6 +486,10 @@ gateway flatly refuses to bind one with no keys at all. ## Development +CI runs on code changes only — a README or `demo/` commit skips it. `[skip ci]` +in a commit message skips it outright, and the arm64 image is only cross-built +for tagged releases, since emulating it is most of the Docker job. + ```bash ./scripts/demo.sh # scripted walkthrough against your providers node scripts/record-dashboard.mjs # re-record the dashboard GIF