mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-09-30 08:23:12 +00:00
Build and test, architecture, and dependency-review are the required checks on main. A merge queue only counts checks that ran on the merge_group event, so each workflow now triggers on it. The architecture gate reads the merge group's own base and head because github.event.before is empty there. The dependency-review action cannot diff a merge group, so that event reports the same check name from a pass-through job; the real review already gated the pull request before it could be queued.
35 lines
981 B
YAML
35 lines
981 B
YAML
name: Architecture and changed-file quality
|
|
|
|
on:
|
|
pull_request:
|
|
# Required by the merge queue; see ci.yml.
|
|
merge_group:
|
|
push:
|
|
branches: [main]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
architecture:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v7
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up .NET
|
|
uses: actions/setup-dotnet@v6
|
|
with:
|
|
dotnet-version: "8.0.x"
|
|
|
|
# CI and local run the same complete repository gate.
|
|
- name: Repository quality gate
|
|
shell: bash
|
|
env:
|
|
# A merge group carries its own base and head; github.event.before is
|
|
# empty on that event.
|
|
BASE_REF: ${{ github.event.pull_request.base.sha || github.event.merge_group.base_sha || github.event.before }}
|
|
HEAD_REF: ${{ github.event.pull_request.head.sha || github.event.merge_group.head_sha || github.sha }}
|
|
run: bash scripts/governance-check.sh
|