Skip to content

Commit 2534627

Browse files
authored
fix: maintenance issues (#452)
1 parent 04c4828 commit 2534627

File tree

6 files changed

+166
-70
lines changed

6 files changed

+166
-70
lines changed

.github/workflows/autodoc_cicd.yml

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,31 @@ on:
1111
branches:
1212
- main
1313

14-
1514
env:
1615
RESET_PIP_CACHE_2: 1
1716
RESET_AUTOSUMMARY_CACHE_2: 1
1817
RESET_DOC_BUILD_CACHE_2: 1
1918
MAIN_PYTHON_VERSION: '3.12'
2019

20+
permissions: {}
2121

2222
jobs:
2323
generate-code:
2424
name: "Building repository - autodoc"
2525
runs-on: ubuntu-latest
2626
steps:
2727
- name: "Install Git and checkout project"
28-
uses: actions/checkout@v4
28+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
29+
with:
30+
persist-credentials: false
2931

3032
- name: "Setup Python"
31-
uses: actions/setup-python@v5
33+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
3234
with:
3335
python-version: ${{ env.MAIN_PYTHON_VERSION }}
3436

3537
- name: "Cache pip"
36-
uses: actions/cache@v4
38+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 # zizmor: ignore[cache-poisoning]
3739
with:
3840
path: ~/.cache/pip
3941
key: Python-pyconverter-generatedcommands-v${{ env.RESET_PIP_CACHE_2 }}-${{ hashFiles('pyproject.toml') }}
@@ -42,12 +44,13 @@ jobs:
4244
4345
# The token will expire in 2024.
4446
- name: "Checkout mapdl-cmd-doc repository"
45-
uses: actions/checkout@v4
47+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4648
with:
4749
repository: ansys-internal/mapdl-cmd-doc
4850
ref: feat/pyconverter-xml2py-predifined-format
4951
token: ${{ secrets.MAPDL_CMD_DOC_TOKEN }}
5052
path: mapdl-cmd-doc
53+
persist-credentials: false
5154

5255
- name: "Install pyconverter-xml2py"
5356
run: |
@@ -56,10 +59,10 @@ jobs:
5659
5760
- name: "Create pyconverter-autogenerated package"
5861
run: |
59-
pyconverter-xml2py package -x ${{ github.workspace }}/mapdl-cmd-doc -f ${{ github.workspace }}/tests/customized_functions -l 100
62+
pyconverter-xml2py package -x ${GITHUB_WORKSPACE}/mapdl-cmd-doc -f ${GITHUB_WORKSPACE}/tests/customized_functions -l 100
6063
6164
- name: Upload autogenerated doc artifacts
62-
uses: actions/upload-artifact@v4
65+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
6366
with:
6467
name: package
6568
path: ./package
@@ -71,15 +74,15 @@ jobs:
7174
needs: [generate-code]
7275
steps:
7376
- name: Download autogenerated documentation
74-
uses: actions/download-artifact@v4
77+
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.1.9
7578
with:
7679
name: package
7780

7881
- name: Test download artifacts
7982
run: ls -R -a
8083

8184
- name: PyAnsys code style checks
82-
uses: ansys/actions/code-style@v10
85+
uses: ansys/actions/code-style@1096998b81f7ebdea116b683e11f3a8bda759ca6 # v10.0.14
8386
with:
8487
python-version: ${{ env.MAIN_PYTHON_VERSION }}
8588
use-python-cache: false
@@ -91,12 +94,12 @@ jobs:
9194
needs: [auto-doc-code-style]
9295
steps:
9396
- name: Download autogenerated documentation
94-
uses: actions/download-artifact@v4
97+
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.1.9
9598
with:
9699
name: package
97100

98101
- name: "Cache pip"
99-
uses: actions/cache@v4
102+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 # zizmor: ignore[cache-poisoning]
100103
with:
101104
path: ~/.cache/pip
102105
key: Python-pyconverter-generatedcommands-v${{ env.RESET_PIP_CACHE_2 }}-${{ env.MAIN_PYTHON_VERSION }}-${{ hashFiles('pyproject.toml') }}
@@ -113,23 +116,23 @@ jobs:
113116
echo "PyConverter-GeneratedCommands version is: $(python -c 'from pyconverter.generatedcommands import __version__; print(__version__)')"
114117
115118
- name: "Cache docs build directory"
116-
uses: actions/cache@v4
119+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 # zizmor: ignore[cache-poisoning]
117120
with:
118121
path: doc/_build
119122
key: doc-build-pyconverter-generatedcommands-v${{ env.RESET_DOC_BUILD_CACHE_2 }}-${{ inputs.PYCONVERTER_GENERATED_VERSION }}-${{ github.sha }}
120123
restore-keys: |
121124
doc-build-pyconverter-generatedcommands-v${{ env.RESET_DOC_BUILD_CACHE_2 }}-${{ inputs.PYCONVERTER_GENERATED_VERSION }}
122125
123126
- name: "Cache autosummary"
124-
uses: actions/cache@v4
127+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 # zizmor: ignore[cache-poisoning]
125128
with:
126129
path: doc/source/_autosummary/*.rst
127130
key: autosummary-pyconverter-generatedcommands-v${{ env.RESET_AUTOSUMMARY_CACHE_2 }}-${{ inputs.PYCONVERTER_GENERATED_VERSION }}-${{ github.sha }}
128131
restore-keys: |
129132
autosummary-pyconverter-generatedcommands-v${{ env.RESET_AUTOSUMMARY_CACHE_2 }}-${{ inputs.PYCONVERTER_GENERATED_VERSION }}
130133
131134
- name: "Run Ansys documentation building action"
132-
uses: ansys/actions/doc-build@v10
135+
uses: ansys/actions/doc-build@1096998b81f7ebdea116b683e11f3a8bda759ca6 # v10.0.14
133136
with:
134137
python-version: ${{ env.MAIN_PYTHON_VERSION }}
135138
checkout: false

0 commit comments

Comments
 (0)