Skip to content

Commit b96cb54

Browse files
committed
fix(ci): use complete requirements files for --require-hashes pip installs
1 parent f86d09e commit b96cb54

8 files changed

Lines changed: 768 additions & 20 deletions

File tree

.github/workflows/docs.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ jobs:
1818
build:
1919
runs-on: 'ubuntu-latest'
2020
steps:
21-
- name: Harden the runner (Audit all outbound calls)
22-
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
21+
- name: 'Harden the runner (Audit all outbound calls)'
22+
uses: 'step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594' # v2.16.0
2323
with:
24-
egress-policy: audit
24+
egress-policy: 'audit'
2525

2626
- name: 'Checkout repository'
2727
uses: 'actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd' # v6.0.2
@@ -32,9 +32,7 @@ jobs:
3232
python-version: '3.12'
3333

3434
- name: 'Install dependencies'
35-
run: |
36-
pip install --require-hashes --requirement /dev/stdin <<< "mkdocs==1.6.1 --hash=sha256:db91759624d1647f3f34aa0c3f327dd2601beae39a366d6e064c03468d35c20e"
37-
pip install --require-hashes --requirement /dev/stdin <<< "mkdocs-material==9.7.6 --hash=sha256:71b84353921b8ea1ba84fe11c50912cc512da8fe0881038fcc9a0761c0e635ba"
35+
run: 'pip install --require-hashes --requirement docs-requirements.txt'
3836

3937
- name: 'Generate docs structure'
4038
run: 'python3 tools/build-docs'
@@ -54,10 +52,10 @@ jobs:
5452
name: 'github-pages'
5553
url: '${{ steps.deployment.outputs.page_url }}'
5654
steps:
57-
- name: Harden the runner (Audit all outbound calls)
58-
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
55+
- name: 'Harden the runner (Audit all outbound calls)'
56+
uses: 'step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594' # v2.16.0
5957
with:
60-
egress-policy: audit
58+
egress-policy: 'audit'
6159

6260
- name: 'Deploy to GitHub Pages'
6361
id: 'deployment'

.github/workflows/lf-build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ jobs:
2727

2828
steps:
2929

30-
- name: Harden the runner (Audit all outbound calls)
31-
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
30+
- name: 'Harden the runner (Audit all outbound calls)'
31+
uses: 'step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594' # v2.16.0
3232
with:
33-
egress-policy: audit
33+
egress-policy: 'audit'
3434

3535
- name: 'git clone https://github.com/Linuxfabrik/lfops'
3636
uses: 'actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd' # v6.0.2
@@ -71,7 +71,7 @@ jobs:
7171
- name: 'Install Ansible Builder'
7272
run: |
7373
python3 -m pip install --upgrade pip
74-
pip install --require-hashes --requirement /dev/stdin <<< "ansible-builder==3.1.1 --hash=sha256:a8246022edb92ca27ea95e87c7af30bcb2752f108dcc75fbf96e77196dff1072"
74+
pip install --require-hashes --requirement build-requirements.txt
7575
7676
- name: 'Strip badges from README.md (not rendered correctly on Galaxy)'
7777
run: |

.github/workflows/lf-release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616

1717
steps:
1818

19-
- name: Harden the runner (Audit all outbound calls)
20-
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
19+
- name: 'Harden the runner (Audit all outbound calls)'
20+
uses: 'step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594' # v2.16.0
2121
with:
22-
egress-policy: audit
22+
egress-policy: 'audit'
2323

2424
- name: 'Create GitHub Release for ${{ github.ref_name }}'
2525
uses: 'softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe' # v2.6.1

.github/workflows/pre-commit-autoupdate.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ jobs:
1414
contents: 'write'
1515
pull-requests: 'write'
1616
steps:
17-
- name: Harden the runner (Audit all outbound calls)
18-
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
17+
- name: 'Harden the runner (Audit all outbound calls)'
18+
uses: 'step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594' # v2.16.0
1919
with:
20-
egress-policy: audit
20+
egress-policy: 'audit'
2121

2222
- name: 'Checkout repository'
2323
uses: 'actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd' # v6.0.2
@@ -28,7 +28,7 @@ jobs:
2828
python-version: '3.12'
2929

3030
- name: 'Install pre-commit'
31-
run: 'pip install --require-hashes --requirement /dev/stdin <<< "pre-commit==4.5.1 --hash=sha256:3b3afd891e97337708c1674210f8eba659b52a38ea5f822ff142d10786221f77"'
31+
run: 'pip install --require-hashes --requirement pre-commit-requirements.txt'
3232

3333
- name: 'Run pre-commit autoupdate'
3434
run: 'pre-commit autoupdate'

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212

1313
### Fixed
1414

15+
* **ci**: Fix `--require-hashes` pip installs by providing complete requirements files with all transitive dependencies pinned
1516
* **role:mount**: Fix `when` condition for NFS/CIFS client package installation failing with multiple mounts and when `state` key is undefined
1617

1718
### Changed

0 commit comments

Comments
 (0)