Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/ci-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7.1.0
with:
Expand All @@ -22,6 +24,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7.1.0
with:
Expand Down
17 changes: 13 additions & 4 deletions .github/workflows/ci-markdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,23 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- uses: h13/.github/actions/apply-org-config@9b63cbc981ae430485fde9132712ac5c70ad2c34 # main
with:
config-file: .markdownlint-cli2.yaml
persist-credentials: false

- name: Apply org markdownlint config if no local override
env:
CONFIG_FILE: .markdownlint-cli2.yaml
run: |
if [ ! -f "$CONFIG_FILE" ]; then
curl -fsSL "https://raw.githubusercontent.com/h13/.github/main/${CONFIG_FILE}" -o "$CONFIG_FILE"
echo "Applied org config: $CONFIG_FILE"
fi

- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
# renovate: datasource=node-version depName=node
node-version: "26"

- run: npx markdownlint-cli2 "${{ inputs.glob }}"
- env:
GLOB: ${{ inputs.glob }}
run: npx markdownlint-cli2 "$GLOB"
2 changes: 2 additions & 0 deletions .github/workflows/ci-node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

# Toolchain comes from the calling repository's .mise.toml — the single
# source of truth for node/pnpm versions, kept fresh by Renovate.
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ci-opentofu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- uses: opentofu/setup-opentofu@a1320f892987e89d278cc92dc5adc984fb93aca4 # v2.0.2
with:
Expand All @@ -29,6 +31,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- uses: terraform-linters/setup-tflint@6ffdbaa3be476b3431f7275c26966ef32ff60337 # v6.3.2

Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/ci-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ jobs:

steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # 2.40.0
with:
Expand All @@ -55,7 +57,13 @@ jobs:
restore-keys: ${{ runner.os }}-composer-

- name: Install dependencies
run: composer install --no-interaction --prefer-dist ${{ inputs.composer-args }}
env:
COMPOSER_ARGS: ${{ inputs.composer-args }}
run: |
# shellcheck disable=SC2086 # word splitting of the args is the contract
composer install --no-interaction --prefer-dist $COMPOSER_ARGS

- name: Run tests
run: ${{ inputs.test-command }}
env:
TEST_COMMAND: ${{ inputs.test-command }}
run: eval "$TEST_COMMAND"
4 changes: 4 additions & 0 deletions .github/workflows/ci-terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:
working-directory: ${{ inputs.working-directory }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- uses: hashicorp/setup-terraform@dfe3c3f87815947d99a8997f908cb6525fc44e9e # v4.0.1
with:
Expand All @@ -39,6 +41,8 @@ jobs:
working-directory: ${{ inputs.working-directory }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- uses: terraform-linters/setup-tflint@6ffdbaa3be476b3431f7275c26966ef32ff60337 # v6.3.2

Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/ci-zizmor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: CI (zizmor)

on:
workflow_call:
inputs:
min-severity:
description: Minimum severity to report (informational/low/medium/high)
type: string
# medium by default so adopting repos are not blocked by the
# widespread low-severity findings (e.g. artipacked); tighten per repo.
default: medium

permissions:
contents: read

jobs:
zizmor:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- uses: zizmorcore/zizmor-action@1b4550e929643b8b26a62303c6bd64814271a4f1 # v0.9.2
with:
# renovate: datasource=pypi depName=zizmor
version: "1.33.1"
advanced-security: "false"
annotations: "true"
min-severity: ${{ inputs.min-severity }}
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- uses: rhysd/actionlint@914e7df21a07ef503a81201c76d2b11c789d3fca # v1.7.12

test-markdown:
uses: ./.github/workflows/ci-markdown.yml
with:
glob: "{README,CONTRIBUTING,SECURITY,profile/**,sync/**}.md"

zizmor:
uses: ./.github/workflows/ci-zizmor.yml
with:
# The source of the shared workflows holds itself to the strict bar.
min-severity: low
2 changes: 2 additions & 0 deletions .github/workflows/publish-node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/repo-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Generate sync config from Node.js repos
env:
Expand Down
5 changes: 5 additions & 0 deletions .github/zizmor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
rules:
self-repository:
# actionlint (<=1.7.12) rejects the suggested `$/` syntax; drop once it learns it.
ignore:
- ci.yml
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ jobs:

## Composite Actions

| Action | Description |
| -------------------------- | ----------------------------------------------- |
| `actions/apply-org-config` | Download org config if no local override exists |
| Action | Description |
| ------------------------- | ---------------------------------------------------------- |
| `actions/setup-toolchain` | mise runtimes + pnpm store cache + lockfile-pinned install |

## Automation

Expand Down Expand Up @@ -76,10 +76,10 @@ h13/dotfiles ← Dev environment + repo-init
└─ configures → GitHub settings (branch protection, labels, alerts)

h13/.github ← Reusable Workflows + shared config ★
├─ ci-{node,go,php,terraform,markdown}.yml (reusable, SHA-pinned)
├─ ci-{node,go,php,opentofu,terraform,markdown,zizmor}.yml (reusable, SHA-pinned)
├─ compliance-audit.yml (monthly)
├─ repo-sync.yml (dynamic sync to all repos)
└─ apply-org-config action
└─ setup-toolchain action

h13/renovate-config ← Shared Renovate preset
├─ default.json (config:best-practices + all stack rules, single preset)
Expand Down
21 changes: 0 additions & 21 deletions actions/apply-org-config/action.yml

This file was deleted.