Skip to content

Commit 1a8bd3e

Browse files
committed
fix all but 1 zizmor lints
1 parent d68aa96 commit 1a8bd3e

File tree

6 files changed

+57
-31
lines changed

6 files changed

+57
-31
lines changed

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ updates:
1212
groups:
1313
github-actions:
1414
patterns:
15-
- '*'
15+
- '*'

.github/workflows/cibuildwheel.yml

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: Wheels
22

33
on:
44
pull_request:
5-
65
push:
7-
tags:
8-
- "v*"
6+
release:
7+
types:
8+
- published
99

1010
jobs:
1111
build_bdist:
@@ -28,19 +28,20 @@ jobs:
2828
arch: x86_64
2929

3030
steps:
31-
- uses: actions/checkout@v4
31+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3232
with:
3333
fetch-depth: 0
34+
persist-credentials: false
3435

3536
# For aarch64 support
3637
# https://cibuildwheel.pypa.io/en/stable/faq/#emulation
37-
- uses: docker/setup-qemu-action@v3
38+
- uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
3839
with:
3940
platforms: all
4041
if: runner.os == 'Linux' && matrix.arch == 'aarch64'
4142

4243
- name: "Building ${{ matrix.os }} (${{ matrix.arch }}) wheels"
43-
uses: pypa/[email protected]
44+
uses: pypa/cibuildwheel@5f22145df44122af0f5a201f93cf0207171beca7 # v3.0.0
4445
env:
4546
# Skips pypy and musllinux for now.
4647
CIBW_SKIP: "pp* cp36-* cp37-* cp38-* *-musllinux*"
@@ -52,19 +53,21 @@ jobs:
5253
python -c "import gsw; print(f'gsw v{gsw.__version__}')" &&
5354
python -m pytest --pyargs gsw
5455
55-
- uses: actions/upload-artifact@v4
56+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
5657
with:
5758
name: pypi-artifacts-${{ matrix.os }}-${{ matrix.arch }}
5859
path: ${{ github.workspace }}/wheelhouse/*.whl
59-
60+
permissions:
61+
actions: write
6062

6163
build_sdist:
6264
name: Build source distribution
6365
runs-on: ubuntu-22.04
6466
steps:
65-
- uses: actions/checkout@v4
67+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
6668
with:
6769
fetch-depth: 0
70+
persist-credentials: false
6871

6972
- name: Build sdist
7073
run: >
@@ -73,17 +76,19 @@ jobs:
7376
&& twine check dist/*
7477
&& check-manifest --verbose
7578
76-
- uses: actions/upload-artifact@v4
79+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
7780
with:
7881
name: pypi-artifacts
7982
path: ${{ github.workspace }}/dist/*.tar.gz
83+
permissions:
84+
actions: write
8085

8186
show-artifacts:
8287
needs: [build_bdist, build_sdist]
8388
name: "Show artifacts"
8489
runs-on: ubuntu-22.04
8590
steps:
86-
- uses: actions/download-artifact@v4
91+
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
8792
with:
8893
pattern: pypi-artifacts*
8994
path: ${{ github.workspace }}/dist
@@ -92,7 +97,8 @@ jobs:
9297
- shell: bash
9398
run: |
9499
ls -l ${{ github.workspace }}/dist
95-
100+
permissions:
101+
actions: none
96102

97103
publish-artifacts-pypi:
98104
needs: [build_bdist, build_sdist]
@@ -101,14 +107,16 @@ jobs:
101107
# upload to PyPI for every tag starting with 'v'
102108
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
103109
steps:
104-
- uses: actions/download-artifact@v4
110+
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
105111
with:
106112
pattern: pypi-artifacts*
107113
path: ${{ github.workspace }}/dist
108114
merge-multiple: true
109115

110-
- uses: pypa/gh-action-pypi-publish@release/v1
116+
- uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
111117
with:
112118
user: __token__
113119
password: ${{ secrets.PYPI_PASSWORD }}
114120
print_hash: true
121+
permissions:
122+
actions: write

.github/workflows/deploy-docs.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: Build and Deploy docs
22

33
on:
44
pull_request:
5-
65
push:
7-
tags:
8-
- "v*"
6+
release:
7+
types:
8+
- published
99

1010
defaults:
1111
run:
@@ -15,10 +15,14 @@ jobs:
1515
run:
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/checkout@v4
18+
- name: checkout
19+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
20+
with:
21+
fetch-depth: 0
22+
persist-credentials: false
1923

2024
- name: Set up Python
21-
uses: actions/setup-python@v5
25+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
2226
with:
2327
python-version: "3.x"
2428

@@ -36,7 +40,9 @@ jobs:
3640
3741
- name: GitHub Pages action
3842
if: success() && github.event_name == 'release'
39-
uses: peaceiris/actions-gh-pages@v4
43+
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
4044
with:
4145
github_token: ${{ secrets.GITHUB_TOKEN }}
4246
publish_dir: docs/_build/html
47+
permissions:
48+
actions: write

.github/workflows/pre-commit.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ jobs:
99
pre-commit:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v4
13-
- uses: actions/setup-python@v5
14-
- uses: pre-commit/[email protected]
12+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
13+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
14+
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
15+
permissions:
16+
actions: none

.github/workflows/test_code_generation.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Test code generation
33
on:
44
pull_request:
55
push:
6-
branches: [main]
6+
branches: [ main ]
77

88
defaults:
99
run:
@@ -14,10 +14,13 @@ jobs:
1414
runs-on: ubuntu-latest
1515

1616
steps:
17-
- uses: actions/checkout@v4
17+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
18+
with:
19+
fetch-depth: 0
20+
persist-credentials: false
1821

1922
- name: Set up Python
20-
uses: actions/setup-python@v5
23+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
2124
with:
2225
python-version: "3.x"
2326

@@ -39,4 +42,6 @@ jobs:
3942
- name: Install gsw
4043
run: >
4144
python -m pip install -v -e . --no-deps --no-build-isolation --force-reinstall
42-
&& python -m pytest -s -rxs -v gsw/tests
45+
&& python -m pytest -s -rxs -v gsw/tests
46+
permissions:
47+
actions: none

.github/workflows/tests.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Tests
33
on:
44
pull_request:
55
push:
6-
branches: [main]
6+
branches: [ main ]
77

88
defaults:
99
run:
@@ -24,10 +24,13 @@ jobs:
2424
fail-fast: false
2525

2626
steps:
27-
- uses: actions/checkout@v4
27+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
28+
with:
29+
fetch-depth: 0
30+
persist-credentials: false
2831

2932
- name: Set up Python
30-
uses: actions/setup-python@v5
33+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
3134
with:
3235
python-version: ${{ matrix.python-version }}
3336

@@ -40,3 +43,5 @@ jobs:
4043
- name: Tests
4144
run: |
4245
python -m pytest -s -rxs -v gsw/tests
46+
permissions:
47+
actions: none

0 commit comments

Comments
 (0)