Skip to content

Commit c6cf9c1

Browse files
authored
chore: harden actions (#313)
1 parent 8a7f61e commit c6cf9c1

File tree

6 files changed

+24
-23
lines changed

6 files changed

+24
-23
lines changed

.github/dependabot.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
# To get started with Dependabot version updates, you'll need to specify which
2-
# package ecosystems to update and where the package manifests are located.
3-
# Please see the documentation for all configuration options:
4-
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5-
61
version: 2
2+
73
updates:
8-
- package-ecosystem: "" # See documentation for possible values
9-
directory: "/" # Location of package manifests
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
106
schedule:
11-
interval: "monthly"
7+
interval: monthly
8+
labels:
9+
- dependencies
10+
- github-actions
11+
commit-message:
12+
prefix: "chore: bump GitHub Actions"
13+
include: "scope"
14+
open-pull-requests-limit: 5
15+
rebase-strategy: auto

.github/workflows/add-help-wanted.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
steps:
1717
- name: Add issue to project
1818
id: add-to-project
19-
uses: actions/[email protected]
19+
uses: actions/add-to-project@9bfe908f2eaa7ba10340b31e314148fcfe6a2458 # v1.0.1
2020
with:
2121
project-url: https://github.com/orgs/pyOpenSci/projects/3
2222
# This is a organization level token so it can be used across all repos in our org

.github/workflows/publish-pypi.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,10 @@ jobs:
1515
runs-on: ubuntu-latest
1616
# This ensures that the publish action only runs in the main repository
1717
# rather than forks
18-
# Environment is encouraged so adding
1918
environment: build
2019
steps:
2120
- name: Checkout
22-
uses: actions/checkout@v4
21+
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
2322
with:
2423
# This fetch element is only important if you are use SCM based
2524
# versioning (that looks at git tags to gather the version)
@@ -31,7 +30,7 @@ jobs:
3130
run: git fetch origin 'refs/tags/*:refs/tags/*'
3231

3332
- name: Setup Python
34-
uses: actions/setup-python@v5
33+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
3534
with:
3635
python-version: "3.10"
3736
- name: Install Hatch
@@ -47,7 +46,7 @@ jobs:
4746
ls -lh dist/
4847
# Store an artifact of the build to use in the publish step below
4948
- name: Store the distribution packages
50-
uses: actions/upload-artifact@v4
49+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
5150
with:
5251
name: python-package-distributions
5352
path: dist/
@@ -62,10 +61,10 @@ jobs:
6261
name: pypi
6362
url: https://pypi.org/p/pyosmeta
6463
permissions:
65-
id-token: write # this permission is mandatory for pypi publishing
64+
id-token: write # this permission is mandatory for PyPI publishing
6665
steps:
6766
- name: Download all the dists
68-
uses: actions/download-artifact@v4
67+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
6968
with:
7069
name: python-package-distributions
7170
path: dist/

.github/workflows/run-script.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
steps:
1212
# TODO: consider replacing python/pip/update-web-metadata installs with docker image
1313
- name: Setup Python
14-
uses: actions/setup-python@v5
14+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
1515
- name: Upgrade pip
1616
run: |
1717
# install pip=>20.1 to use "pip cache dir"
@@ -20,7 +20,7 @@ jobs:
2020
run: python -m pip install git+https://github.com/pyopenSci/update-web-metadata
2121

2222
- name: Check out the code
23-
uses: actions/checkout@v4
23+
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
2424
with:
2525
persist-credentials: false
2626

.github/workflows/run-tests.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,12 @@ jobs:
1515
build:
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/checkout@v4
18+
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
1919
with:
2020
persist-credentials: false
21-
22-
- uses: actions/setup-python@v5
21+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
2322
with:
2423
python-version: "3.10"
25-
2624
- name: Install Hatch
2725
run: pipx install hatch
2826
- name: Run tests

.github/workflows/test-update-contribs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ jobs:
1616
- name: Check out the code
1717
with:
1818
persist-credentials: false
19-
uses: actions/checkout@v4
19+
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
2020
- name: Setup Python
21-
uses: actions/setup-python@v5
21+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
2222
with:
2323
python-version: "3.10"
2424
- name: Upgrade pip

0 commit comments

Comments
 (0)