Skip to content

Commit e0fb878

Browse files
ci: pin actions to sha (#1462)
* ci: pin actions to sha refs: equinor/ecalc-internal#1658 * ci: add version comment to pinned actions
1 parent 7167fa3 commit e0fb878

7 files changed

Lines changed: 32 additions & 32 deletions

File tree

.github/workflows/ensure-code-quality.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
workflow_dispatch:
55
workflow_call:
66

7-
permissions: {}
7+
permissions: { }
88

99
env:
1010
UV_SYSTEM_PYTHON: 1
@@ -16,10 +16,10 @@ jobs:
1616
name: Build & Run Pre Commit hooks to verify code structure, quality etc. from pre-commit hooks
1717
runs-on: ubuntu-24.04
1818
steps:
19-
- uses: actions/checkout@v6
19+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2020

2121
- name: Install uv
22-
uses: astral-sh/setup-uv@v7
22+
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
2323
with:
2424
enable-cache: true
2525

@@ -35,10 +35,10 @@ jobs:
3535
name: Type check with basedpyright
3636
runs-on: ubuntu-24.04
3737
steps:
38-
- uses: actions/checkout@v6
38+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3939

4040
- name: Install uv
41-
uses: astral-sh/setup-uv@v7
41+
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
4242
with:
4343
enable-cache: true
4444

.github/workflows/license-scan.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ jobs:
1212
contents: read
1313
steps:
1414
- name: 'Checkout Repository'
15-
uses: actions/checkout@v6
15+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1616

1717
- name: 'Dependency Review'
1818
id: review
19-
uses: actions/dependency-review-action@v4
19+
uses: actions/dependency-review-action@2031cfc080254a8a887f58cffee85186f0e49e48 # v4.9.0
2020
with:
2121
allow-licenses: 0BSD, BSD-1-Clause, BSD-2-Clause, BSD-3-Clause, LGPL-2.0-or-later, LGPL-2.1-or-later, LGPL-3.0-only, LGPL-3.0-or-later, MIT, WTFPL, Apache-2.0, MPL-2.0, ISC
22-
# Note that we explicitly allow LGPL-2.x-or-later, since LGPL-2.x (only) is not compatible with LGPL-3.x
23-
# allow-dependencies-licenses: 'pkg:pypi/numpy'
24-
#
22+
# Note that we explicitly allow LGPL-2.x-or-later, since LGPL-2.x (only) is not compatible with LGPL-3.x
23+
# allow-dependencies-licenses: 'pkg:pypi/numpy'
24+
#
2525
- name: 'Disallow unlicensed/unknown license'
2626
shell: bash
2727
env:

.github/workflows/publish-docs.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
workflow_dispatch:
55
workflow_call:
66

7-
permissions: {}
7+
permissions: { }
88

99
env:
1010
GITHUB_PAGES_BRANCH: gh-pages
@@ -20,10 +20,10 @@ jobs:
2020

2121
steps:
2222
- name: Checkout code
23-
uses: actions/checkout@v6
23+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2424

2525
- name: Install uv
26-
uses: astral-sh/setup-uv@v7
26+
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
2727
with:
2828
enable-cache: true
2929

@@ -43,7 +43,7 @@ jobs:
4343
uv run python generate_json_schema.py > ../docs/docs/about/getting_started/yaml/ecalc_json_schema.json
4444
4545
- name: Setup node
46-
uses: actions/setup-node@v6
46+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
4747
with:
4848
node-version: 24
4949
cache: npm

.github/workflows/publish-libecalc.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Publish libeCalc package to PyPI
22

33
on:
44
workflow_run:
5-
workflows: [release-please]
5+
workflows: [ release-please ]
66
types:
77
- completed
88
# Note! We cannot trigger on published event, since that can only be triggered when done manually (or with a
@@ -16,17 +16,17 @@ on:
1616
# NOTE!: When using Trusted Publishing to PyPI, we cannot do that from within a reusable workflow, therefore
1717
# we make it independent, and trigger it with published event from release-please workflow, instead of calling explicitly.
1818

19-
permissions: {}
19+
permissions: { }
2020

2121
jobs:
22-
check-release-created: # Parses JSON file from release-please workflow to see if a release was created
22+
check-release-created: # Parses JSON file from release-please workflow to see if a release was created
2323
permissions:
2424
actions: read # to dl artifacts from triggering workflow
2525
contents: read
2626
runs-on: ubuntu-24.04
2727
steps:
2828
- name: Download release-please outputs
29-
uses: actions/download-artifact@v8
29+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
3030
with:
3131
name: release-please-outputs
3232
run-id: ${{ github.event.workflow_run.id }}
@@ -55,13 +55,13 @@ jobs:
5555
runs-on: ubuntu-24.04
5656
steps:
5757
- name: Checkout code
58-
uses: actions/checkout@v6
58+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
5959
with:
6060
# NOTE: Make sure we publish from the main branch, not the triggering ref
6161
ref: ${{ github.event.repository.default_branch }}
6262

6363
- name: Install uv
64-
uses: astral-sh/setup-uv@v7
64+
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
6565
with:
6666
enable-cache: true
6767

@@ -75,7 +75,7 @@ jobs:
7575
run: uv build
7676

7777
- name: Publish to PyPI
78-
uses: pypa/gh-action-pypi-publish@release/v1
78+
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
7979
with:
8080
# repository-url: https://test.pypi.org/legacy/ # NOTE: Only needed to specify for Test PyPI
8181
packages-dir: dist/

.github/workflows/release-please.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
types:
88
- completed
99

10-
permissions: {}
10+
permissions: { }
1111

1212
jobs:
1313
release-please:
@@ -17,7 +17,7 @@ jobs:
1717
issues: write
1818
runs-on: ubuntu-24.04
1919
steps:
20-
- uses: googleapis/release-please-action@v4
20+
- uses: googleapis/release-please-action@16a9c90856f42705d54a6fda1823352bdc62cf38 # v4.4.0
2121
id: release
2222
with:
2323
config-file: 'release-please-config.json'
@@ -39,13 +39,13 @@ jobs:
3939
- name: set release created
4040
if: ${{ needs.release-please.outputs.release_created == 'true' }}
4141
run: |
42-
echo '{"release_created":"true"}' > release-please-data/outputs.json
42+
echo '{"release_created":"true"}' > release-please-data/outputs.json
4343
- name: set release NOT created
4444
if: ${{ needs.release-please.outputs.release_created != 'true' }}
4545
run: |
4646
echo '{"release_created":"false"}' > release-please-data/outputs.json
4747
- name: Upload release-please data
48-
uses: actions/upload-artifact@v7
48+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
4949
with:
5050
name: release-please-outputs
5151
path: release-please-data/

.github/workflows/test-docs.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
workflow_dispatch:
55
workflow_call:
66

7-
permissions: {}
7+
permissions: { }
88

99
jobs:
1010
build-docs:
@@ -14,10 +14,10 @@ jobs:
1414

1515
steps:
1616
- name: Checkout code
17-
uses: actions/checkout@v6
17+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1818

1919
- name: Install uv
20-
uses: astral-sh/setup-uv@v7
20+
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
2121
with:
2222
enable-cache: true
2323

@@ -37,7 +37,7 @@ jobs:
3737
uv run python generate_json_schema.py > ../docs/docs/about/getting_started/yaml/ecalc_json_schema.json
3838
3939
- name: Setup node
40-
uses: actions/setup-node@v6
40+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
4141
with:
4242
node-version: 24
4343
cache: npm

.github/workflows/test-library.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ on:
33
workflow_dispatch:
44
workflow_call:
55

6-
permissions: {}
6+
permissions: { }
77

88
jobs:
99
test-library:
@@ -17,10 +17,10 @@ jobs:
1717
group: [ 1,2,3,4,5 ]
1818
steps:
1919
- name: Checkout code
20-
uses: actions/checkout@v6
20+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2121

2222
- name: Install uv
23-
uses: astral-sh/setup-uv@v7
23+
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
2424
with:
2525
enable-cache: true
2626
python-version: ${{ matrix.python-version }}

0 commit comments

Comments
 (0)