a06f331eb8
CI / benchmark (push) Has been skipped
install-script / posix-syntax (push) Successful in 6m1s
CI / build-onnx (push) Failing after 6m43s
init-smoke / dry-run (push) Failing after 15m57s
security / govulncheck (push) Has been cancelled
security / trivy-fs (push) Has been cancelled
CI / test (1.26, ubuntu-latest) (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
CI / test (1.26, macos-latest) (push) Has been cancelled
CI / build-windows (push) Has been cancelled
CI / lint (push) Has been cancelled
install-script / powershell-syntax (push) Has been cancelled
install-script / install (macos-14) (push) Has been cancelled
install-script / install (ubuntu-latest) (push) Has been cancelled
63 lines
1.7 KiB
YAML
63 lines
1.7 KiB
YAML
name: gortex-architecture
|
|
|
|
# Re-runs `gortex export --format mermaid --scope all` on every push to main
|
|
# and opens a PR when the diagrams drift. Drop this file at
|
|
# `.github/workflows/gortex-architecture.yml` in your repo to enable it.
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
|
|
jobs:
|
|
regenerate-diagrams:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: stable
|
|
|
|
- name: Build gortex
|
|
run: |
|
|
go install github.com/zzet/gortex/cmd/gortex@latest
|
|
echo "$(go env GOPATH)/bin" >> "$GITHUB_PATH"
|
|
|
|
- name: Index repo
|
|
run: gortex index .
|
|
|
|
- name: Regenerate Mermaid diagrams
|
|
run: |
|
|
mkdir -p docs/architecture
|
|
gortex export --format mermaid --scope all --out-dir docs/architecture/
|
|
|
|
- name: Detect drift
|
|
id: drift
|
|
run: |
|
|
if git diff --quiet -- docs/architecture; then
|
|
echo "changed=false" >> "$GITHUB_OUTPUT"
|
|
else
|
|
echo "changed=true" >> "$GITHUB_OUTPUT"
|
|
fi
|
|
|
|
- name: Create pull request
|
|
if: steps.drift.outputs.changed == 'true'
|
|
uses: peter-evans/create-pull-request@v6
|
|
with:
|
|
commit-message: "docs: refresh gortex architecture diagrams"
|
|
title: "docs: refresh gortex architecture diagrams"
|
|
body: |
|
|
Auto-generated by `gortex export --format mermaid --scope all`.
|
|
Triggered by commit ${{ github.sha }}.
|
|
branch: chore/refresh-gortex-architecture
|
|
delete-branch: true
|
|
add-paths: docs/architecture
|