Skip to content

Commit c12d3b0

Browse files
committed
🔒 Pass the pedantic zizmor
1 parent a83df8a commit c12d3b0

5 files changed

Lines changed: 80 additions & 25 deletions

File tree

.github/workflows/ci.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,20 @@ on:
55
push:
66
branches: [main]
77

8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
10+
cancel-in-progress: true
11+
12+
permissions: {}
13+
814
jobs:
915
pre-commit:
16+
name: pre-commit
1017
runs-on: ubuntu-latest
1118
steps:
1219
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
20+
with:
21+
persist-credentials: false
1322
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
1423
- uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
1524
with:
@@ -22,6 +31,8 @@ jobs:
2231
runs-on: ubuntu-latest
2332
steps:
2433
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
34+
with:
35+
persist-credentials: false
2536
- uses: pandoc/actions/setup@86321b6dd4675f5014c611e05088e10d4939e09e # v1.1.1
2637
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
2738
with:

.github/workflows/pages.yml

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,52 +9,55 @@ on:
99
# Allows you to run this workflow manually from the Actions tab
1010
workflow_dispatch:
1111

12-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13-
permissions:
14-
contents: read
15-
pages: write
16-
id-token: write
17-
1812
# Allow one concurrent deployment
1913
concurrency:
2014
group: "pages"
2115
cancel-in-progress: true
2216

17+
permissions: {}
18+
2319
jobs:
24-
# Single deploy job since we’re just deploying
2520
deploy:
21+
name: Single deploy job since we’re just deploying
22+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
23+
permissions:
24+
contents: read # necessary for the deployment to GitHub Pages
25+
pages: write # necessary for the deployment to GitHub Pages
26+
id-token: write # necessary for the deployment to GitHub Pages
2627
environment:
2728
name: github-pages
2829
url: ${{ steps.deployment.outputs.page_url }}
2930
runs-on: ubuntu-latest
3031
steps:
3132
- name: Checkout
32-
uses: actions/checkout@v6
33+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
34+
with:
35+
persist-credentials: false
3336
- name: Install packages
3437
run: sudo apt install plantuml
3538
- name: Setup pandoc
36-
uses: pandoc/actions/setup@v1
39+
uses: pandoc/actions/setup@86321b6dd4675f5014c611e05088e10d4939e09e # v1.1.1
3740
- name: Setup python
38-
uses: actions/setup-python@v6
41+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
3942
with:
4043
python-version-file: .python-version
4144
architecture: x64
4245
- name: Setup cached uv
43-
uses: hynek/setup-cached-uv@v2
46+
uses: hynek/setup-cached-uv@4300ec2180bc77d705e626a34e381b81a4772c51 # v2.5.0
4447
- name: Build and activate venv
4548
run: |
4649
uv venv
4750
echo "$PWD/.venv/bin" >> $GITHUB_PATH
4851
uv pip install --group=docs
4952
- name: Setup Pages
50-
uses: actions/configure-pages@v5
53+
uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0
5154
- name: Build HTML
5255
run: uv run make html
5356
working-directory: docs/
5457
- name: Upload artifact
55-
uses: actions/upload-pages-artifact@v4
58+
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
5659
with:
5760
path: docs/_build/html
5861
- name: Deploy to GitHub Pages
5962
id: deployment
60-
uses: actions/deploy-pages@v4
63+
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0

.github/workflows/zizmor.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# https://github.com/woodruffw/zizmor
2+
name: Zizmor
3+
4+
on:
5+
push:
6+
branches: ["main"]
7+
pull_request:
8+
branches: ["**"]
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
12+
cancel-in-progress: true
13+
14+
permissions: {}
15+
16+
jobs:
17+
zizmor:
18+
name: Run zizmor
19+
runs-on: ubuntu-latest
20+
permissions:
21+
security-events: write # Required for upload-sarif (used by zizmor-action) to upload SARIF files.
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
25+
with:
26+
persist-credentials: false
27+
28+
- name: Run zizmor
29+
uses: zizmorcore/zizmor-action@71321a20a9ded102f6e9ce5718a2fcec2c4f70d8 # v0.5.2
30+
with:
31+
persona: pedantic

docs/packs/.github/workflows/build_wheels.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
name: Build
22

33
on:
4-
workflow_dispatch:
4+
push:
5+
branches: [main]
56
release:
67
types:
78
- published
9+
workflow_dispatch:
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
13+
cancel-in-progress: true
14+
15+
permissions: {}
816

917
jobs:
1018
build_wheels:
@@ -17,6 +25,8 @@ jobs:
1725

1826
steps:
1927
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
28+
with:
29+
persist-credentials: false
2030

2131
- name: Build wheels
2232
uses: pypa/cibuildwheel@8d2b08b68458a16aeb24b64e68a09ab1c8e82084 # v3.4.1

docs/packs/cibuildwheel.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,14 @@ Finally, the tests can also run against the wheels.
2828
.. literalinclude:: .github/workflows/build_wheels.yml
2929
:caption: .github/workflows/build_wheels.yml
3030
:language: yaml
31-
:lines: 1-7
31+
:lines: 1-15
32+
33+
``release``
34+
is executed when a tagged version is transferred.
35+
36+
.. seealso::
37+
* `release
38+
<https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#release>`_
3239

3340
``workflow_dispatch``
3441
allows you to click a button in the graphical user interface to trigger
@@ -39,18 +46,11 @@ Finally, the tests can also run against the wheels.
3946
* `workflow_dispatch
4047
<https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/>`_
4148

42-
``release``
43-
is executed when a tagged version is transferred.
44-
45-
.. seealso::
46-
* `release
47-
<https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#release>`_
48-
4949
Now the :term:`wheels <wheel>` can be built with:
5050

5151
.. literalinclude:: .github/workflows/build_wheels.yml
5252
:language: yaml
53-
:lines: 9-22
53+
:lines: 17-32
5454

5555
This runs the CI workflow with the following default settings:
5656

@@ -66,7 +66,7 @@ Finally, the tests can also run against the wheels.
6666

6767
.. literalinclude:: .github/workflows/build_wheels.yml
6868
:language: yaml
69-
:lines: 24-
69+
:lines: 34-
7070

7171
.. tab:: GitLab CI/CD
7272

0 commit comments

Comments
 (0)