Skip to content

Commit f080e50

Browse files
authored
Merge pull request #627 from tacaswell/harden_gha
CI: Harden GHA configuration
2 parents 9e22bf4 + 3412cec commit f080e50

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
version: 2
3+
updates:
4+
- package-ecosystem: "github-actions"
5+
directory: "/" # Location of your workflow files
6+
schedule:
7+
interval: "weekly" # Options: daily, weekly, monthly

.github/workflows/build.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
permissions:
2+
contents: read
13
on:
24
push:
35
paths:
@@ -16,6 +18,8 @@ jobs:
1618
runs-on: ubuntu-22.04
1719
steps:
1820
- uses: actions/checkout@v4
21+
with:
22+
persist-credentials: false
1923

2024
- name: Set up Python
2125
uses: actions/setup-python@v5
@@ -41,6 +45,8 @@ jobs:
4145
runs-on: ubuntu-22.04
4246
steps:
4347
- uses: actions/checkout@v4
48+
with:
49+
persist-credentials: false
4450

4551
- name: Set up Python
4652
uses: actions/setup-python@v5
@@ -67,6 +73,8 @@ jobs:
6773
runs-on: ${{ matrix.os }}
6874
steps:
6975
- uses: actions/checkout@v4
76+
with:
77+
persist-credentials: false
7078

7179
- name: Set up Python
7280
uses: actions/setup-python@v5
@@ -119,7 +127,7 @@ jobs:
119127
echo "SDIST_DIR=$extractedDir" | Out-File -FilePath $env:GITHUB_ENV -Append
120128
121129
- name: Build basemap wheels from sdist
122-
uses: pypa/[email protected]
130+
uses: pypa/cibuildwheel@ee63bf16da6cddfb925f542f2c7b59ad50e93969 # v2.22.0
123131
env:
124132
CIBW_ARCHS: "native"
125133
CIBW_BUILD: "cp39* cp310* cp311* cp312* cp313*"
@@ -182,6 +190,8 @@ jobs:
182190
runs-on: ubuntu-22.04
183191
steps:
184192
- uses: actions/checkout@v4
193+
with:
194+
persist-credentials: false
185195

186196
- name: Set up Python
187197
uses: actions/setup-python@v5
@@ -270,7 +280,7 @@ jobs:
270280
merge-multiple: true
271281

272282
- name: Publish to PyPI
273-
uses: pypa/gh-action-pypi-publish@release/v1
283+
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
274284
with:
275285
password: ${{ secrets.PYPI_TOKEN }}
276286
repository-url: ${{ secrets.PYPI_REPOSITORY_URL }}

0 commit comments

Comments
 (0)