seahaven-site/.github/workflows/ci.yaml
Adam Moussa 88658139ef
ci: drop the legacy ci job (#74)
The second ci-static call existed to emit ci / ci and cancelled the real static run. ci-complete is the remaining gate.
2026-10-02 18:21:01 -04:00

57 lines
1.9 KiB
YAML

name: CI
# Parallel static-site and Terraform portions. ci-complete is the check the
# CI complete ruleset requires.
on:
pull_request:
branches: [main, hotfix/**, release/**]
merge_group:
push:
branches: [hotfix/**, release/**]
permissions:
contents: read
jobs:
autofix:
if: github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork
uses: Sea-Haven-Industries/.github/.github/workflows/ci-autofix.yaml@0a1010e63248c9ca9f042c870eb2c579ba6b9455 # v1.0.19
permissions:
contents: write
secrets: inherit
with:
presets: terraform
static:
needs: autofix
if: always() && !cancelled() && (needs.autofix.result == 'skipped' || needs.autofix.outputs.committed != 'true')
uses: Sea-Haven-Industries/.github/.github/workflows/ci-static.yaml@0a1010e63248c9ca9f042c870eb2c579ba6b9455 # v1.0.19
with:
build-command: "npx @11ty/eleventy"
check-dir: "_site"
terraform:
needs: autofix
if: always() && !cancelled() && (needs.autofix.result == 'skipped' || needs.autofix.outputs.committed != 'true')
uses: Sea-Haven-Industries/.github/.github/workflows/ci-terraform.yaml@0a1010e63248c9ca9f042c870eb2c579ba6b9455 # v1.0.19
with:
terraform-version: "1.16.0"
ci-complete:
name: ci-complete
needs: [autofix, static, terraform]
if: always() && !cancelled() && (needs.autofix.result == 'skipped' || needs.autofix.outputs.committed != 'true')
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Require portions
env:
AUTOFIX: ${{ needs.autofix.result }}
STATIC: ${{ needs.static.result }}
TERRAFORM: ${{ needs.terraform.result }}
run: |
set -euo pipefail
test "${AUTOFIX}" = success -o "${AUTOFIX}" = skipped
test "${STATIC}" = success
test "${TERRAFORM}" = success