mirror of
https://github.com/Sea-Haven-Industries/.github.git
synced 2026-10-07 15:08:56 +00:00
61 lines
2.1 KiB
YAML
61 lines
2.1 KiB
YAML
name: CI
|
|
on:
|
|
pull_request:
|
|
branches: [main, hotfix/**, release/**]
|
|
merge_group:
|
|
push:
|
|
branches: [hotfix/**, release/**]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
select-runner:
|
|
# Picks GitHub-hosted while Actions is operational, the org self-hosted
|
|
# runner otherwise. See callable-select-runner.yaml for the policy.
|
|
uses: Sea-Haven-Industries/.github/.github/workflows/callable-select-runner.yaml@REPLACE-ME # vX.Y.Z
|
|
|
|
autofix:
|
|
needs: select-runner
|
|
if: github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork
|
|
uses: Sea-Haven-Industries/.github/.github/workflows/ci-autofix.yaml@REPLACE-ME # vX.Y.Z
|
|
permissions:
|
|
contents: write
|
|
secrets: inherit
|
|
with:
|
|
runner: ${{ needs.select-runner.outputs.runner }}
|
|
presets: prettier,terraform
|
|
|
|
frontend:
|
|
needs: [select-runner, autofix]
|
|
if: always() && !cancelled() && (needs.autofix.result == 'skipped' || needs.autofix.outputs.committed != 'true')
|
|
uses: Sea-Haven-Industries/.github/.github/workflows/ci-frontend.yaml@REPLACE-ME # vX.Y.Z
|
|
with:
|
|
runner: ${{ needs.select-runner.outputs.runner }}
|
|
node-version: "24"
|
|
unit-shards: 4
|
|
run-e2e: true
|
|
|
|
terraform:
|
|
needs: [select-runner, autofix]
|
|
if: always() && !cancelled() && (needs.autofix.result == 'skipped' || needs.autofix.outputs.committed != 'true')
|
|
uses: Sea-Haven-Industries/.github/.github/workflows/ci-terraform.yaml@REPLACE-ME # vX.Y.Z
|
|
with:
|
|
runner: ${{ needs.select-runner.outputs.runner }}
|
|
terraform-version: "1.16.0"
|
|
|
|
ci-complete:
|
|
name: ci-complete
|
|
needs: [select-runner, autofix, frontend, terraform]
|
|
if: always() && !cancelled() && (needs.autofix.result == 'skipped' || needs.autofix.outputs.committed != 'true')
|
|
runs-on: ${{ needs.select-runner.outputs.runner || 'ubuntu-latest' }}
|
|
timeout-minutes: 5
|
|
steps:
|
|
- name: Require portions
|
|
env:
|
|
FRONTEND: ${{ needs.frontend.result }}
|
|
TERRAFORM: ${{ needs.terraform.result }}
|
|
run: |
|
|
set -euo pipefail
|
|
test "${FRONTEND}" = success
|
|
test "${TERRAFORM}" = success
|