Skip to content

Commit 34d3cf3

Browse files
committed
fiz all zizmor lints
1 parent eb3449f commit 34d3cf3

5 files changed

Lines changed: 55 additions & 43 deletions

File tree

.github/dependabot.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@ updates:
1111
- "*" # Group all Actions updates into a single larger pull request
1212
schedule:
1313
interval: weekly
14+
cooldown:
15+
default-days: 7

.github/workflows/cibuildwheel.yml

Lines changed: 20 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ on:
44
pull_request:
55
branches:
66
- master
7-
push:
8-
tags:
9-
- "v*"
7+
release:
8+
types:
9+
- published
1010

1111
jobs:
1212
build_bdist:
@@ -31,19 +31,13 @@ jobs:
3131
arch: ARM64
3232

3333
steps:
34-
- uses: actions/checkout@v6
34+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3535
with:
3636
fetch-depth: 0
37-
38-
# For aarch64 support
39-
# https://cibuildwheel.pypa.io/en/stable/faq/#emulation
40-
#- uses: docker/setup-qemu-action@v3
41-
# with:
42-
# platforms: all
43-
# if: runner.os == 'Linux' && matrix.arch == 'aarch64'
37+
persist-credentials: false
4438

4539
- name: Build just oldest and newest on PRs, all on tags
46-
if: ${{ github.event_name }} == pull_request
40+
if: github.event_name == "pull_request"
4741
shell: bash
4842
# - On PPs, omit musllinux for speed
4943
# - On PRs, run just oldest and newest Python versions (3.11 is the oldest abi3 target)
@@ -57,51 +51,39 @@ jobs:
5751
echo "Setting CIBW_TEST_SKIP=$CIBW_TEST_SKIP"
5852
5953
- name: "Building ${{ matrix.os }} (${{ matrix.arch }}) wheels"
60-
uses: pypa/cibuildwheel@v3.3.1
54+
uses: pypa/cibuildwheel@298ed2fb2c105540f5ed055e8a6ad78d82dd3a7e # v3.3.1
6155
env:
6256
CIBW_SKIP: ${{ env.CIBW_SKIP }}
6357
CIBW_TEST_SKIP: ${{ env.CIBW_TEST_SKIP }}
6458
CIBW_ARCHS: ${{ matrix.arch }}
6559

66-
- uses: actions/upload-artifact@v6
60+
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
6761
with:
6862
name: pypi-artifacts-${{ matrix.os }}-${{ matrix.arch }}
6963
path: ${{ github.workspace }}/wheelhouse/*.whl
70-
64+
permissions:
65+
actions: write
7166

7267
build_sdist:
7368
name: Build source distribution
7469
runs-on: ubuntu-22.04
7570
steps:
76-
- uses: actions/checkout@v6
71+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
7772
with:
7873
fetch-depth: 0
74+
persist-credentials: false
7975

8076
- name: Build sdist
8177
run: >
8278
pip install build
8379
&& python -m build --sdist . --outdir dist
8480
85-
- uses: actions/upload-artifact@v6
81+
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
8682
with:
8783
name: pypi-artifacts
8884
path: ${{ github.workspace }}/dist/*.tar.gz
89-
90-
show-artifacts:
91-
needs: [build_bdist, build_sdist]
92-
name: "Show artifacts"
93-
runs-on: ubuntu-22.04
94-
steps:
95-
- uses: actions/download-artifact@v7
96-
with:
97-
pattern: pypi-artifacts*
98-
path: ${{ github.workspace }}/dist
99-
merge-multiple: true
100-
101-
- shell: bash
102-
run: |
103-
ls -l ${{ github.workspace }}/dist
104-
85+
permissions:
86+
actions: write
10587

10688
publish-artifacts-pypi:
10789
needs: [build_bdist, build_sdist]
@@ -110,14 +92,17 @@ jobs:
11092
# upload to PyPI for every tag starting with 'v'
11193
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
11294
steps:
113-
- uses: actions/download-artifact@v7
95+
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
11496
with:
11597
pattern: pypi-artifacts*
11698
path: ${{ github.workspace }}/dist
11799
merge-multiple: true
118100

119-
- uses: pypa/gh-action-pypi-publish@release/v1
101+
# Move to Trusted Publishing
102+
- uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
120103
with:
121104
user: __token__
122105
password: ${{ secrets.PYPI_PASSWORD }}
123106
print_hash: true
107+
permissions:
108+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing

.github/workflows/deploy-docs.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,32 @@
11
name: Build and Deploy docs
22

33
on:
4+
pull_request:
45
push:
56
branches:
67
- master
8+
release:
9+
types:
10+
- published
11+
12+
# Deny all permissions by default
13+
permissions: {}
714

815
jobs:
916
build-docs:
1017
runs-on: ubuntu-latest
18+
permissions:
19+
contents: write
1120

1221
steps:
1322
- name: checkout
14-
uses: actions/checkout@v6
23+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
1524
with:
1625
fetch-depth: 0
26+
persist-credentials: false
1727

1828
- name: Setup Mamba
19-
uses: mamba-org/setup-micromamba@v2
29+
uses: mamba-org/setup-micromamba@add3a49764cedee8ee24e82dfde87f5bc2914462 # v2.0.7
2030
with:
2131
environment-name: TEST
2232
create-args: >-
@@ -43,7 +53,8 @@ jobs:
4353
popd
4454
4555
- name: Deploy
46-
uses: peaceiris/actions-gh-pages@v4
56+
if: success() && github.event_name == 'release'
57+
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
4758
with:
4859
github_token: ${{ secrets.GITHUB_TOKEN }}
4960
publish_dir: docs/_build/html

.github/workflows/tests_conda.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
push:
66
branches: [master]
77

8+
# Deny all permissions by default
9+
permissions: {}
10+
811
jobs:
912
run:
1013
runs-on: ${{ matrix.os }}
@@ -25,10 +28,12 @@ jobs:
2528
experimental: true
2629

2730
steps:
28-
- uses: actions/checkout@v6
31+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
32+
with:
33+
persist-credentials: false
2934

3035
- name: Setup micromamba Env
31-
uses: mamba-org/setup-micromamba@v2
36+
uses: mamba-org/setup-micromamba@add3a49764cedee8ee24e82dfde87f5bc2914462 # v2.0.7
3237
with:
3338
environment-name: TEST
3439
create-args: >-

.github/workflows/tests_latest.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
name: Build and test with development python
2-
on: [push, pull_request]
2+
3+
on:
4+
pull_request:
5+
push:
6+
7+
# Deny all permissions by default
8+
permissions: {}
9+
310
jobs:
411
build-linux:
512
name: Python (${{ matrix.python-version }})
@@ -9,10 +16,12 @@ jobs:
916
python-version: ["3.14.0b.1"]
1017
steps:
1118

12-
- uses: actions/checkout@v6
19+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
20+
with:
21+
persist-credentials: false
1322

1423
- name: Set up Python ${{ matrix.python-version }}
15-
uses: actions/setup-python@v6
24+
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
1625
with:
1726
python-version: ${{ matrix.python-version }}
1827

0 commit comments

Comments
 (0)