Skip to content

Commit 87e551e

Browse files
committed
Add pinact and zizmor workflow checks
1 parent 8bb16da commit 87e551e

4 files changed

Lines changed: 76 additions & 12 deletions

File tree

.github/workflows/pinact.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Pinact
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["**"]
8+
paths:
9+
- ".github/workflows/**"
10+
- ".github/actions/**"
11+
12+
permissions: {}
13+
14+
jobs:
15+
pinact:
16+
# Only run on pull requests from the same repository
17+
if: github.event.pull_request.head.repo.full_name == github.repository
18+
runs-on: ubuntu-latest
19+
permissions:
20+
contents: read
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
24+
with:
25+
persist-credentials: false
26+
27+
- name: Pin actions
28+
uses: suzuki-shunsuke/pinact-action@cf51507d80d4d6522a07348e3d58790290eaf0b6 # v2.0.0
29+
with:
30+
skip_push: true
31+
verify: true
32+
min_age: 7

.github/workflows/python-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ jobs:
88
release:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v3
11+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
1212
- name: Set up Python 3.8
13-
uses: actions/setup-python@v4
13+
uses: actions/setup-python@7f4fc3e22c37d6ff65e88745f38bd3157c663f7c # v4.9.1
1414
with:
1515
python-version: 3.8
1616
- name: Install build requirements

.github/workflows/python-test.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ jobs:
99
format:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v3
12+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
1313
with:
1414
fetch-depth: 0
1515
- name: Set up Python 3.8
16-
uses: actions/setup-python@v4
16+
uses: actions/setup-python@7f4fc3e22c37d6ff65e88745f38bd3157c663f7c # v4.9.1
1717
with:
1818
python-version: 3.8
1919
- name: Install dependencies
@@ -30,11 +30,11 @@ jobs:
3030
django: ["3.2", "4.0"]
3131
wagtail: ["2.16", "3.0"]
3232
steps:
33-
- uses: actions/checkout@v3
33+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
3434
with:
3535
fetch-depth: 0
3636
- name: Set up Python ${{ matrix.python }}
37-
uses: actions/setup-python@v4
37+
uses: actions/setup-python@7f4fc3e22c37d6ff65e88745f38bd3157c663f7c # v4.9.1
3838
with:
3939
python-version: ${{ matrix.python }}
4040
- name: Install dependencies
@@ -45,7 +45,7 @@ jobs:
4545
TOXENV: py${{ matrix.python }}-django${{ matrix.django }}-wagtail${{ matrix.wagtail }}
4646
- name: Prepare artifacts
4747
run: mkdir .coverage-data && mv .coverage.* .coverage-data/
48-
- uses: actions/upload-artifact@v3
48+
- uses: actions/upload-artifact@ff15f0306b3f739f7b6fd43fb5d26cd321bd4de5 # v3.2.1
4949
with:
5050
name: coverage-data
5151
path: .coverage-data/
@@ -54,15 +54,15 @@ jobs:
5454
runs-on: ubuntu-latest
5555
needs: [test]
5656
steps:
57-
- uses: actions/checkout@v3
57+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
5858
with:
5959
fetch-depth: 0
60-
- uses: actions/download-artifact@v3
60+
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
6161
with:
6262
name: coverage-data
6363
path: .
6464
- name: Set up Python 3.8
65-
uses: actions/setup-python@v4
65+
uses: actions/setup-python@7f4fc3e22c37d6ff65e88745f38bd3157c663f7c # v4.9.1
6666
with:
6767
python-version: 3.8
6868
- name: Install dependencies
@@ -73,14 +73,14 @@ jobs:
7373
coverage xml
7474
coverage report -m --skip-covered
7575
- name: Code Coverage Summary Report
76-
uses: irongut/CodeCoverageSummary@v1.3.0
76+
uses: irongut/CodeCoverageSummary@51cc3a756ddcd398d447c044c02cb6aa83fdae95 # v1.3.0
7777
with:
7878
filename: coverage.xml
7979
badge: true
8080
format: 'markdown'
8181
output: 'both'
8282
- name: Add Coverage PR Comment
83-
uses: marocchino/sticky-pull-request-comment@v2
83+
uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2.9.4
8484
if: github.event_name == 'pull_request'
8585
with:
8686
recreate: true

.github/workflows/zizmor.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Zizmor
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["**"]
8+
paths:
9+
- ".github/workflows/**"
10+
- ".github/actions/**"
11+
12+
permissions: {}
13+
14+
jobs:
15+
zizmor:
16+
name: Run zizmor
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: read
20+
actions: read
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
24+
with:
25+
persist-credentials: false
26+
27+
- name: Run zizmor
28+
uses: zizmorcore/zizmor-action@71321a20a9ded102f6e9ce5718a2fcec2c4f70d8 # v0.5.2
29+
with:
30+
advanced-security: false
31+
annotations: true
32+
min-severity: high

0 commit comments

Comments
 (0)