@@ -16,10 +16,10 @@ concurrency:
1616 cancel-in-progress : true
1717
1818permissions :
19- contents : write
19+ contents : read
2020 packages : read
21- pull-requests : write
22- issues : write
21+ pull-requests : read
22+ issues : read
2323
2424env :
2525 API_CODE_CACHE : 6
@@ -41,10 +41,12 @@ jobs:
4141 name : " Add license headers"
4242 runs-on : ubuntu-latest
4343 steps :
44- - uses : actions/checkout@v5
44+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
45+ with :
46+ persist-credentials : false
4547
4648 - name : Set up Python
47- uses : actions/setup-python@v6
49+ uses : actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
4850 with :
4951 python-version : ${{ env.MAIN_PYTHON_VERSION }}
5052
@@ -117,7 +119,7 @@ jobs:
117119
118120 check-vulnerabilities :
119121 name : " Check library vulnerabilities"
120- runs-on : ubuntu-22.04
122+ runs-on : ubuntu-latest
121123 steps :
122124 - uses : ansys/actions/check-vulnerabilities@main
123125 with :
@@ -129,6 +131,16 @@ jobs:
129131 hide-log : false
130132 bandit-configfile : " pyproject.toml"
131133
134+ actions-security :
135+ name : " Actions Security"
136+ runs-on : ubuntu-latest
137+ steps :
138+ - uses : ansys/actions/check-actions-security@c2fa7c93f6883114e0e643599431b33d29f0b13f # v10.1.4
139+ with :
140+ generate-summary : true
141+ token : ${{ secrets.GITHUB_TOKEN }}
142+ auditing-level : ' high'
143+
132144 docs_build :
133145 name : Build Documentation
134146 needs : [docs-style]
@@ -138,10 +150,12 @@ jobs:
138150 PYFLUENT_CONTAINER_MOUNT_SOURCE : " /home/ansys/Downloads/ansys_fluent_core_examples"
139151
140152 steps :
141- - uses : actions/checkout@v5
153+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
154+ with :
155+ persist-credentials : false
142156
143157 - name : Setup Python
144- uses : actions/setup-python@v6
158+ uses : actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
145159 with :
146160 python-version : ${{ env.PYTHON_VERSION }}
147161
@@ -151,12 +165,13 @@ jobs:
151165 sudo apt-get install pandoc libegl1 make xvfb libfontconfig1 libxrender1 libxkbcommon-x11-0 -y
152166
153167 - name : Cache pip
154- uses : actions/cache@v4
168+ uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
155169 with :
156170 path : ~/.cache/pip
157171 key : Python-${{ runner.os }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('pyproject.toml') }}
158172 restore-keys : |
159173 Python-${{ runner.os }}-${{ env.PYTHON_VERSION }}
174+ lookup-only : false # zizmor: ignore[cache-poisoning]
160175
161176 - name : Install Quarto
162177 uses : quarto-dev/quarto-actions/setup@9e48da27e184aa238fcb49f5db75469626d43adb # v2.1.9
@@ -186,12 +201,13 @@ jobs:
186201 id : version
187202
188203 - name : Cache API Code
189- uses : actions/cache@v4
204+ uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
190205 id : cache-api-code
191206 with :
192207 path : |
193208 src/ansys/fluent/core/generated
194209 key : API-Code-v${{ env.API_CODE_CACHE }}-${{ steps.version.outputs.PYFLUENT_VERSION }}-${{ env.DOC_DEPLOYMENT_IMAGE_TAG }}-${{ hashFiles('src/ansys/fluent/core/codegen/**') }}
210+ lookup-only : false # zizmor: ignore[cache-poisoning]
195211
196212 - name : Login to GitHub Container Registry
197213 if : steps.cache-api-code.outputs.cache-hit != 'true'
@@ -227,14 +243,16 @@ jobs:
227243 FLUENT_IMAGE_TAG : ${{ env.DOC_DEPLOYMENT_IMAGE_TAG }}
228244
229245 - name : Zip HTML Documentation before upload
246+ env :
247+ DOC_DEPLOYMENT_IMG : ${{ env.DOC_DEPLOYMENT_IMAGE_TAG }}
230248 run : |
231249 sudo apt install zip -y
232250 pushd doc/_build/html
233- zip -r ../../../HTML-Documentation-tag-${{ env.DOC_DEPLOYMENT_IMAGE_TAG } }.zip .
251+ zip -r ../../../HTML-Documentation-tag-${DOC_DEPLOYMENT_IMG }.zip .
234252 popd
235253
236254 - name : Upload HTML Documentation
237- uses : actions/upload-artifact@v4
255+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
238256 with :
239257 name : HTML-Documentation-tag-${{ env.DOC_DEPLOYMENT_IMAGE_TAG }}
240258 path : HTML-Documentation-tag-${{ env.DOC_DEPLOYMENT_IMAGE_TAG }}.zip
@@ -250,20 +268,23 @@ jobs:
250268 runs-on : [self-hosted, pyfluent]
251269
252270 steps :
253- - uses : actions/checkout@v5
271+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
272+ with :
273+ persist-credentials : false
254274
255275 - name : Setup Python
256- uses : actions/setup-python@v6
276+ uses : actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
257277 with :
258278 python-version : ${{ env.MAIN_PYTHON_VERSION }}
259279
260280 - name : Cache pip
261- uses : actions/cache@v4
281+ uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
262282 with :
263283 path : ~/.cache/pip
264284 key : Python-${{ runner.os }}-${{ env.MAIN_PYTHON_VERSION }}-${{ hashFiles('pyproject.toml') }}
265285 restore-keys : |
266286 Python-${{ runner.os }}-${{ env.MAIN_PYTHON_VERSION }}
287+ lookup-only : false # zizmor: ignore[cache-poisoning]
267288
268289 - name : Add version information
269290 run : make version-info
@@ -285,13 +306,14 @@ jobs:
285306 password : ${{ secrets.GITHUB_TOKEN }}
286307
287308 - name : Cache API Code
288- uses : actions/cache@v4
309+ uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
289310 id : cache-api-code
290311 with :
291312 path : src/ansys/fluent/core/generated
292313 # Combined cache key for all versions:
293314 # API-Code-<Cache version>-<PyFluent version>-<First Fluent release version>-<Last Fluent release version>-<Fluent dev version>-<Hash of codegen files>
294315 key : API-Code-v${{ env.API_CODE_CACHE }}-${{ steps.version.outputs.PYFLUENT_VERSION }}-v23.1.0-v25.2.0-${{ vars.FLUENT_STABLE_IMAGE_DEV }}-${{ hashFiles('src/ansys/fluent/core/codegen/**') }}
316+ lookup-only : false # zizmor: ignore[cache-poisoning]
295317
296318 - name : Pull 23.1 Fluent docker image
297319 if : steps.cache-api-code.outputs.cache-hit != 'true'
@@ -453,7 +475,7 @@ jobs:
453475 twine check dist/*
454476
455477 - name : Upload package
456- uses : actions/upload-artifact@v4
478+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
457479 with :
458480 name : PyFluent-packages
459481 path : |
@@ -493,17 +515,19 @@ jobs:
493515 FLUENT_IMAGE_TAG : ${{ matrix.version == 261 && vars.FLUENT_STABLE_IMAGE_DEV || matrix.image-tag }}
494516
495517 steps :
496- - uses : actions/checkout@v5
518+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
519+ with :
520+ persist-credentials : false
497521
498522 - name : Setup Python
499523 if : ${{ !contains(github.event.pull_request.title, '[skip tests]') }}
500- uses : actions/setup-python@v6
524+ uses : actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
501525 with :
502526 python-version : ${{ env.MAIN_PYTHON_VERSION }}
503527
504528 - name : Download package
505529 if : ${{ !contains(github.event.pull_request.title, '[skip tests]') }}
506- uses : actions/download-artifact@v5
530+ uses : actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
507531 with :
508532 name : PyFluent-packages
509533 path : dist
@@ -533,17 +557,19 @@ jobs:
533557
534558 - name : Unit Testing
535559 if : ${{ !contains(github.event.pull_request.title, '[skip tests]') }}
560+ env :
561+ MATRIX_VERSION : ${{ matrix.version }}
536562 run : |
537563 make install-test
538- make unittest-dev-${{ matrix.version } }
564+ make unittest-dev-${MATRIX_VERSION }
539565
540566 - name : Cleanup previous docker containers
541567 if : always()
542568 run : make cleanup-previous-docker-containers
543569
544570 - name : Upload 25.2 Coverage Artifacts
545571 if : matrix.image-tag == 'v25.2.0'
546- uses : actions/upload-artifact@v4
572+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
547573 with :
548574 name : coverage_report
549575 path : ./htmlcov
@@ -560,20 +586,23 @@ jobs:
560586 PYTEST_XDIST_AUTO_NUM_WORKERS : 1
561587
562588 steps :
563- - uses : actions/checkout@v5
589+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
590+ with :
591+ persist-credentials : false
564592
565593 - name : Setup Python
566- uses : actions/setup-python@v6
594+ uses : actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
567595 with :
568596 python-version : ${{ env.MAIN_PYTHON_VERSION }}
569597
570598 - name : Cache pip
571- uses : actions/cache@v4
599+ uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
572600 with :
573601 path : ~/.cache/pip
574602 key : Python-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}
575603 restore-keys : |
576604 Python-${{ runner.os }}-${{ matrix.python-version }}
605+ lookup-only : false # zizmor: ignore[cache-poisoning]
577606
578607 - name : Add version information
579608 run : make version-info
@@ -640,7 +669,7 @@ jobs:
640669
641670 steps :
642671 - name : Set up Python
643- uses : actions/setup-python@v6
672+ uses : actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
644673 with :
645674 python-version : ${{ env.MAIN_PYTHON_VERSION }}
646675
@@ -658,21 +687,21 @@ jobs:
658687 TWINE_REPOSITORY_URL : https://pkgs.dev.azure.com/pyansys/_packaging/pyansys/pypi/upload
659688
660689 - name : " Download the library artifacts from build-library step"
661- uses : actions/download-artifact@v5
690+ uses : actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
662691 with :
663692 name : PyFluent-packages
664693 path : PyFluent-packages
665694
666695 - name : " Upload artifacts to PyPI using trusted publisher"
667- 696+ uses : pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
668697 with :
669698 repository-url : " https://upload.pypi.org/legacy/"
670699 print-hash : true
671700 packages-dir : PyFluent-packages
672701 skip-existing : false
673702
674703 - name : Release
675- uses : softprops/action-gh-release@v2
704+ uses : softprops/action-gh-release@aec2ec56f94eb8180ceec724245f64ef008b89f5 # v2.4.0
676705 with :
677706 files : |
678707 ./**/*.whl
0 commit comments