Skip to content

Commit 0c54802

Browse files
committed
Update and pin all actions
1 parent a9bfdcd commit 0c54802

File tree

5 files changed

+41
-26
lines changed

5 files changed

+41
-26
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,32 @@ on:
44
push:
55
pull_request:
66

7+
permissions: {}
8+
79
jobs:
810
checks:
911
runs-on: ubuntu-latest
1012
steps:
1113
- name: Checkout working copy
12-
uses: actions/checkout@v4
14+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # 6.0.1
1315
with:
1416
submodules: true
1517
fetch-depth: 0
1618
persist-credentials: false
1719
- name: ruff check
18-
uses: chartboost/ruff-action@v1
20+
uses: astral-sh/ruff-action@57714a7c8a2e59f32539362ba31877a1957dded1 # 3.5.1
21+
with:
22+
version: "latest"
1923
- name: ruff format
2024
if: always()
21-
uses: chartboost/ruff-action@v1
25+
uses: astral-sh/ruff-action@57714a7c8a2e59f32539362ba31877a1957dded1 # 3.5.1
2226
with:
23-
args: format --diff
27+
version: "latest"
28+
args: format --check --diff
2429
- name: Set up Python
2530
id: setup_python
2631
if: always()
27-
uses: actions/setup-python@v5
32+
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # 6.1.0
2833
with:
2934
python-version: "3.x"
3035
- name: Install mypy
@@ -44,12 +49,12 @@ jobs:
4449

4550
steps:
4651
- name: Checkout working copy
47-
uses: actions/checkout@v4
52+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # 6.0.1
4853
with:
4954
submodules: true
5055
persist-credentials: false
5156
- name: Set up Python
52-
uses: actions/setup-python@v5
57+
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # 6.1.0
5358
with:
5459
python-version: "3.x"
5560
- name: Install dependency
@@ -60,14 +65,14 @@ jobs:
6065
run: |
6166
python -mbuild
6267
- name: Upload sdist
63-
uses: actions/upload-artifact@v4
68+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # 6.0.0
6469
with:
6570
name: sdist
6671
path: dist/*.tar.gz
6772
retention-days: 1
6873

6974
- name: Upload wheel
70-
uses: actions/upload-artifact@v4
75+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # 6.0.0
7176
with:
7277
name: wheel
7378
path: dist/*.whl
@@ -102,13 +107,13 @@ jobs:
102107
opts: "--experimental-options --engine.CompileOnly='~tregex re'"
103108
steps:
104109
- name: Checkout working copy
105-
uses: actions/checkout@v4
110+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # 6.0.1
106111
with:
107112
submodules: true
108113
fetch-depth: 0
109114
persist-credentials: false
110115
- name: Set up Python ${{ matrix.python-version }}
111-
uses: actions/setup-python@v5
116+
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # 6.1.0
112117
with:
113118
python-version: ${{ matrix.python-version }}
114119
allow-prereleases: true
@@ -132,7 +137,7 @@ jobs:
132137
- run: 'python -mpip install --only-binary :all: google-re2 || true'
133138
- name: download ${{ matrix.source }} artifact
134139
if: matrix.artifact
135-
uses: actions/download-artifact@v4
140+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # 7.0.0
136141
with:
137142
name: ${{ matrix.source }}
138143
path: dist/

.github/workflows/release-builtins.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: Publish ua-parser builtins
22

33
run-name: Publish ${{ inputs.tag || 'master' }} to ${{ inputs.environment || 'pypy (scheduled)' }}
44

5+
permissions: {}
6+
57
on:
68
schedule:
79
# schedule a dev release on every 1st of the month, at 2034 UTC
@@ -23,13 +25,13 @@ jobs:
2325
outputs:
2426
release: ${{ steps.check.outputs.release }}
2527
steps:
26-
- uses: actions/checkout@v4
28+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # 6.0.1
2729
with:
2830
submodules: true
2931
fetch-depth: 0
3032
persist-credentials: false
3133
- name: Set up Python
32-
uses: actions/setup-python@v5
34+
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # 6.1.0
3335
with:
3436
python-version: "3.x"
3537

@@ -70,7 +72,7 @@ jobs:
7072
mv ua-parser-builtins/dist .
7173
- name: Store the distribution packages
7274
if: ${{ steps.check.outputs.release == 'true' }}
73-
uses: actions/upload-artifact@v4
75+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # 6.0.0
7476
with:
7577
name: python-package-distributions
7678
path: dist/
@@ -90,12 +92,12 @@ jobs:
9092

9193
steps:
9294
- name: Download all the dists
93-
uses: actions/download-artifact@v4
95+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # 7.0.0
9496
with:
9597
name: python-package-distributions
9698
path: dist/
9799
- name: Publish
98-
uses: pypa/gh-action-pypi-publish@release/v1
100+
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # 1.13.0
99101
with:
100102
repository-url: https://test.pypi.org/legacy/
101103
skip-existing: true
@@ -114,11 +116,11 @@ jobs:
114116

115117
steps:
116118
- name: Download all the dists
117-
uses: actions/download-artifact@v4
119+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # 7.0.0
118120
with:
119121
name: python-package-distributions
120122
path: dist/
121123
- name: Publish
122-
uses: pypa/gh-action-pypi-publish@release/v1
124+
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # 1.13.0
123125
with:
124126
verbose: true

.github/workflows/release-main.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
release:
66
types: [created]
77

8+
permissions: {}
9+
810
env:
911
ENVNAME: ${{ github.event_name == 'release' && 'pypi' || 'testpypi' }}
1012

@@ -21,11 +23,11 @@ jobs:
2123

2224
steps:
2325
- name: Checkout working copy
24-
uses: actions/checkout@v4
26+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # 6.0.1
2527
with:
2628
persist-credentials: false
2729
- name: Set up Python
28-
uses: actions/setup-python@v5
30+
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # 6.1.0
2931
with:
3032
python-version: "3.x"
3133
- name: Install dependency
@@ -36,15 +38,15 @@ jobs:
3638
run: python -mbuild
3739
- name: Publish to testpypi
3840
if: ${{ env.ENVNAME == 'testpypi' }}
39-
uses: pypa/gh-action-pypi-publish@release/v1 # zizmor: ignore[use-trusted-publishing]
41+
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # 1.13.0
4042
with:
4143
repository-url: https://test.pypi.org/legacy/
4244
skip-existing: true
4345
verbose: true
4446
password: ${{ secrets.PUBLISH_TOKEN }}
4547
- name: Publish to pypi
4648
if: ${{ env.ENVNAME == 'pypi' }}
47-
uses: pypa/gh-action-pypi-publish@release/v1 # zizmor: ignore[use-trusted-publishing]
49+
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # 1.13.0
4850
with:
4951
verbose: true
5052
password: ${{ secrets.PUBLISH_TOKEN }}

.github/workflows/zizmor.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
push:
55
pull_request:
66

7+
permissions: {}
8+
79
jobs:
810
zizmor:
911
runs-on: ubuntu-latest
@@ -13,20 +15,20 @@ jobs:
1315

1416
steps:
1517
- name: Checkout repository
16-
uses: actions/checkout@v4
18+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # 6.0.1
1719
with:
1820
persist-credentials: false
1921

2022
- name: Install the latest version of uv
21-
uses: astral-sh/setup-uv@v5
23+
uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # 7.1.6
2224

2325
- name: Run zizmor
2426
run: uvx zizmor --format sarif . > results.sarif
2527
env:
2628
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2729

2830
- name: Upload SARIF file
29-
uses: github/codeql-action/upload-sarif@v3
31+
uses: github/codeql-action/upload-sarif@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # 4.31.9
3032
with:
3133
sarif_file: results.sarif
3234
category: zizmor

.github/zizmor.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
rules:
2+
use-trusted-publishing:
3+
ignore:
4+
- release-main.yml # can't do that until pypi/support#6661

0 commit comments

Comments
 (0)