Skip to content

Commit d3d6328

Browse files
fix(ci): use reusable workflows in standards repo itself
Foundationally consolidates CI workflows by ensuring the standards repo uses its own reusable workflows: - codeql.yml: Use codeql-reusable.yml instead of direct CodeQL action calls - deno-ci.yml: New wrapper using deno-ci-reusable.yml - elixir-ci.yml: New wrapper using elixir-ci-reusable.yml - rust-ci.yml: New wrapper using rust-ci-reusable.yml - changelog.yml: New wrapper using changelog-reusable.yml This ensures the standards repo practices what it preaches (estate-wide reusable workflow consolidation) and catches any issues with the reusables before they propagate to consumer repos. Also fixed codeql-reusable.yml to include actions: read in job-level permissions (job-level REPLACES workflow-level, so both must be declared to ensure CodeQL action has required permissions). Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
1 parent 614a793 commit d3d6328

6 files changed

Lines changed: 84 additions & 29 deletions

File tree

.github/workflows/changelog.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# SPDX-License-Identifier: MPL-2.0
2+
name: Changelog
3+
4+
on:
5+
push:
6+
branches: [main, master]
7+
paths:
8+
- 'CHANGELOG.md'
9+
10+
permissions:
11+
contents: write
12+
pull-requests: write
13+
14+
jobs:
15+
generate:
16+
uses: ./.github/workflows/changelog-reusable.yml

.github/workflows/codeql-reusable.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,10 @@ jobs:
7878
analyze:
7979
timeout-minutes: 20
8080
runs-on: ${{ inputs.runs-on }}
81+
# Job-level permissions inherit from workflow-level and ADD security-events: write.
82+
# Do NOT narrow here or CodeQL action loses `actions: read` which it needs.
8183
permissions:
84+
actions: read
8285
contents: read
8386
security-events: write
8487

.github/workflows/codeql.yml

Lines changed: 8 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -29,36 +29,15 @@ concurrency:
2929
cancel-in-progress: false
3030

3131
permissions:
32-
actions: read
3332
contents: read
3433

3534
jobs:
36-
analyze:
37-
timeout-minutes: 20
38-
runs-on: ubuntu-latest
39-
permissions:
40-
contents: read
41-
security-events: write
42-
strategy:
43-
fail-fast: false
44-
matrix:
45-
include:
46-
- language: javascript-typescript
47-
build-mode: none
48-
- language: actions
49-
build-mode: none
35+
analyze-js:
36+
uses: ./.github/workflows/codeql-reusable.yml
37+
with:
38+
language: javascript-typescript
5039

51-
steps:
52-
- name: Checkout
53-
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
54-
55-
- name: Initialize CodeQL
56-
uses: github/codeql-action/init@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v3
57-
with:
58-
languages: ${{ matrix.language }}
59-
build-mode: ${{ matrix.build-mode }}
60-
61-
- name: Perform CodeQL Analysis
62-
uses: github/codeql-action/analyze@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v3
63-
with:
64-
category: "/language:${{ matrix.language }}"
40+
analyze-actions:
41+
uses: ./.github/workflows/codeql-reusable.yml
42+
with:
43+
language: actions

.github/workflows/deno-ci.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# SPDX-License-Identifier: MPL-2.0
2+
name: Deno CI
3+
4+
on:
5+
push:
6+
branches: [main, master]
7+
pull_request:
8+
branches: [main, master]
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
permissions:
15+
contents: read
16+
17+
jobs:
18+
deno:
19+
uses: ./.github/workflows/deno-ci-reusable.yml

.github/workflows/elixir-ci.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# SPDX-License-Identifier: MPL-2.0
2+
name: Elixir CI
3+
4+
on:
5+
push:
6+
branches: [main, master]
7+
pull_request:
8+
branches: [main, master]
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
permissions:
15+
contents: read
16+
17+
jobs:
18+
ci:
19+
uses: ./.github/workflows/elixir-ci-reusable.yml

.github/workflows/rust-ci.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# SPDX-License-Identifier: MPL-2.0
2+
name: Rust CI
3+
4+
on:
5+
push:
6+
branches: [main, master]
7+
pull_request:
8+
branches: [main, master]
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
permissions:
15+
contents: read
16+
17+
jobs:
18+
ci:
19+
uses: ./.github/workflows/rust-ci-reusable.yml

0 commit comments

Comments
 (0)