Skip to content

Commit e303b46

Browse files
committed
Switch to my composite actions and add Zizmor
This removes code duplication.
1 parent fcc93c8 commit e303b46

File tree

2 files changed

+41
-26
lines changed

2 files changed

+41
-26
lines changed

.github/workflows/ci.yml

Lines changed: 32 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,18 @@ on:
66
branches: [ main ]
77
workflow_dispatch:
88

9+
permissions: {}
10+
911
jobs:
1012
tox:
1113
name: ${{ matrix.name }}
1214
runs-on: ubuntu-latest
15+
16+
permissions:
17+
contents: read
18+
19+
container: python:${{ matrix.python }}
20+
1321
strategy:
1422
fail-fast: false
1523
matrix:
@@ -25,25 +33,18 @@ jobs:
2533
- {name: 'package', python: '3.14', tox: package}
2634

2735
steps:
28-
- uses: actions/checkout@v4
29-
30-
- uses: actions/setup-python@v5
36+
- uses: pgjones/actions/tox@dbbee601c084d000c4fc711d4b27cb306e15ead1 # v1
3137
with:
32-
python-version: ${{ matrix.python }}
33-
34-
- name: update pip
35-
run: |
36-
pip install -U wheel
37-
pip install -U setuptools
38-
python -m pip install -U pip
39-
- run: pip install tox
40-
41-
- run: tox -e ${{ matrix.tox }}
38+
environment: ${{ matrix.tox }}
4239

4340

4441
h2spec:
4542
name: ${{ matrix.name }}
4643
runs-on: ubuntu-latest
44+
45+
permissions:
46+
contents: read
47+
4748
strategy:
4849
fail-fast: false
4950
matrix:
@@ -53,6 +54,8 @@ jobs:
5354

5455
steps:
5556
- uses: actions/checkout@v4
57+
with:
58+
persist-credentials: false
5659

5760
- uses: actions/setup-python@v5
5861
with:
@@ -80,6 +83,10 @@ jobs:
8083
autobahn:
8184
name: ${{ matrix.name }}
8285
runs-on: ubuntu-latest
86+
87+
permissions:
88+
contents: read
89+
8390
strategy:
8491
fail-fast: false
8592
matrix:
@@ -89,6 +96,8 @@ jobs:
8996

9097
steps:
9198
- uses: actions/checkout@v4
99+
with:
100+
persist-credentials: false
92101

93102
- uses: actions/setup-python@v5
94103
with:
@@ -107,3 +116,13 @@ jobs:
107116
- name: Run Unit Tests
108117
working-directory: compliance/autobahn
109118
run: docker run --rm --network=host -v "${PWD}/:/config" -v "${PWD}/reports:/reports" --name fuzzingclient crossbario/autobahn-testsuite wstest -m fuzzingclient -s /config/fuzzingclient.json && python3 summarise.py
119+
120+
zizmor:
121+
name: Zizmor
122+
runs-on: ubuntu-latest
123+
124+
permissions:
125+
contents: read
126+
127+
steps:
128+
- uses: pgjones/actions/zizmor@dbbee601c084d000c4fc711d4b27cb306e15ead1 # v1

.github/workflows/publish.yml

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,18 @@ on:
33
push:
44
tags:
55
- '*'
6+
7+
permissions: {}
8+
69
jobs:
710
build:
811
runs-on: ubuntu-latest
9-
steps:
10-
- uses: actions/checkout@v3
1112

12-
- uses: actions/setup-python@v3
13-
with:
14-
python-version: 3.14
13+
permissions:
14+
contents: read
1515

16-
- run: |
17-
pip install pdm
18-
pdm build
19-
- uses: actions/upload-artifact@v3
20-
with:
21-
path: ./dist
16+
steps:
17+
- uses: pgjones/actions/build@dbbee601c084d000c4fc711d4b27cb306e15ead1 # v1
2218

2319
pypi-publish:
2420
needs: ['build']
@@ -30,9 +26,9 @@ jobs:
3026
# IMPORTANT: this permission is mandatory for trusted publishing
3127
id-token: write
3228
steps:
33-
- uses: actions/download-artifact@v3
29+
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
3430

3531
- name: Publish package distributions to PyPI
36-
uses: pypa/gh-action-pypi-publish@release/v1
32+
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
3733
with:
3834
packages_dir: artifact/

0 commit comments

Comments
 (0)