Skip to content

Commit f3d45fb

Browse files
committed
fix zizmor warnings
1 parent a1c3b95 commit f3d45fb

File tree

1 file changed

+38
-17
lines changed

1 file changed

+38
-17
lines changed

.github/workflows/ci.yml

Lines changed: 38 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
env:
1010
PY_COLORS: "1"
1111

12+
permissions:
13+
contents: read
14+
1215
jobs:
1316
test:
1417
runs-on: ${{ matrix.os }}
@@ -29,9 +32,12 @@ jobs:
2932
]
3033
fail-fast: false
3134
steps:
32-
- uses: actions/checkout@v4
35+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
36+
with:
37+
fetch-depth: 0
38+
persist-credentials: false
3339
- name: Install uv
34-
uses: astral-sh/setup-uv@v6
40+
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # 6.4.3
3541
- name: Install tox
3642
run: uv tool install tox --with tox-uv
3743
- name: Setup SocketCAN
@@ -45,10 +51,10 @@ jobs:
4551
tox -e ${{ matrix.env }}
4652
env:
4753
# SocketCAN tests currently fail with PyPy because it does not support raw CAN sockets
48-
# See: https://foss.heptapod.net/pypy/pypy/-/issues/3809
54+
# See: https://github.com/pypy/pypy/issues/3808
4955
TEST_SOCKETCAN: "${{ matrix.os == 'ubuntu-latest' && ! startsWith(matrix.env, 'pypy' ) }}"
5056
- name: Coveralls Parallel
51-
uses: coverallsapp/github-action@v2
57+
uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # 2.3.6
5258
with:
5359
github-token: ${{ secrets.github_token }}
5460
flag-name: Unittests-${{ matrix.os }}-${{ matrix.env }}
@@ -59,19 +65,25 @@ jobs:
5965
needs: test
6066
runs-on: ubuntu-latest
6167
steps:
62-
- uses: actions/checkout@v4
68+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
69+
with:
70+
fetch-depth: 0
71+
persist-credentials: false
6372
- name: Coveralls Finished
64-
uses: coverallsapp/github-action@v2
73+
uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # 2.3.6
6574
with:
6675
github-token: ${{ secrets.github_token }}
6776
parallel-finished: true
6877

6978
static-code-analysis:
7079
runs-on: ubuntu-latest
7180
steps:
72-
- uses: actions/checkout@v4
81+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
82+
with:
83+
fetch-depth: 0
84+
persist-credentials: false
7385
- name: Install uv
74-
uses: astral-sh/setup-uv@v6
86+
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # 6.4.3
7587
- name: Install tox
7688
run: uv tool install tox --with tox-uv
7789
- name: Run linters
@@ -84,9 +96,12 @@ jobs:
8496
docs:
8597
runs-on: ubuntu-latest
8698
steps:
87-
- uses: actions/checkout@v4
99+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
100+
with:
101+
fetch-depth: 0
102+
persist-credentials: false
88103
- name: Install uv
89-
uses: astral-sh/setup-uv@v6
104+
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # 6.4.3
90105
- name: Install tox
91106
run: uv tool install tox --with tox-uv
92107
- name: Build documentation
@@ -97,17 +112,18 @@ jobs:
97112
name: Packaging
98113
runs-on: ubuntu-latest
99114
steps:
100-
- uses: actions/checkout@v4
115+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
101116
with:
102-
fetch-depth: 0 # fetch tags for setuptools-scm
117+
fetch-depth: 0
118+
persist-credentials: false
103119
- name: Install uv
104-
uses: astral-sh/setup-uv@v6
120+
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # 6.4.3
105121
- name: Build wheel and sdist
106-
run: uvx --from build pyproject-build --installer uv
122+
run: uv build
107123
- name: Check build artifacts
108124
run: uvx twine check --strict dist/*
109125
- name: Save artifacts
110-
uses: actions/upload-artifact@v4
126+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # 4.6.2
111127
with:
112128
name: release
113129
path: ./dist
@@ -123,10 +139,15 @@ jobs:
123139
# upload to PyPI only on release
124140
if: github.event.release && github.event.action == 'published'
125141
steps:
126-
- uses: actions/download-artifact@v4
142+
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # 4.3.0
127143
with:
128144
path: dist
129145
merge-multiple: true
130146

147+
- name: Generate artifact attestation
148+
uses: actions/attest-build-provenance@e8998f949152b193b063cb0ec769d69d929409be # 2.4.0
149+
with:
150+
subject-path: 'dist/*'
151+
131152
- name: Publish release distributions to PyPI
132-
uses: pypa/gh-action-pypi-publish@release/v1
153+
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # 1.12.4

0 commit comments

Comments
 (0)