2323 RESET_DOC_BUILD_CACHE : 10
2424 ON_CI : true
2525
26+ permissions :
27+ contents : read
28+ pull-requests : read
29+
2630concurrency :
2731 group : ${{ github.workflow }}-${{ github.ref }}
2832 cancel-in-progress : true
@@ -108,6 +112,8 @@ jobs:
108112 steps :
109113 - name : " Install Git and checkout project"
110114 uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
115+ with :
116+ persist-credentials : false
111117
112118 - name : " Setup Python"
113119 uses : actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
@@ -120,7 +126,7 @@ jobs:
120126 sudo apt-get install pandoc
121127
122128 - name : " Cache pip"
123- uses : actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
129+ uses : actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 # zizmor: ignore[cache-poisoning]
124130 with :
125131 path : ~/.cache/pip
126132 key : Python-v${{ env.RESET_PIP_CACHE }}-${{ runner.os }}-${{ hashFiles('pyproject.toml') }}
@@ -135,6 +141,7 @@ jobs:
135141 ref : feat/pyconverter-xml2py-predifined-format
136142 token : ${{ secrets.MAPDL_CMD_DOC_TOKEN }}
137143 path : mapdl-cmd-doc
144+ persist-credentials : false
138145
139146 - name : " Unit testing requirements installation"
140147 run : |
@@ -143,7 +150,7 @@ jobs:
143150 - name : " Unit testing"
144151 run : |
145152 pytest -v --durations=10 --maxfail=10 \
146- --reruns 7 --reruns-delay 3 --ghdir ${{ github.workspace } }\
153+ --reruns 7 --reruns-delay 3 --ghdir ${GITHUB_WORKSPACE }\
147154 --cov=pyconverter.xml2py --cov-report=xml:coverage.xml --cov-report=html\
148155 --cov-report term
149156
@@ -167,14 +174,16 @@ jobs:
167174 steps :
168175 - name : " Install Git and checkout project"
169176 uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
177+ with :
178+ persist-credentials : false
170179
171180 - name : " Setup Python"
172181 uses : actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
173182 with :
174183 python-version : ${{ env.MAIN_PYTHON_VERSION }}
175184
176185 - name : " Cache pip"
177- uses : actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
186+ uses : actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 # zizmor: ignore[cache-poisoning]
178187 with :
179188 path : ~/.cache/pip
180189 key : Python-pyconverter.xml2py-v${{ env.RESET_PIP_CACHE }}-${{ env.MAIN_PYTHON_VERSION }}-${{ hashFiles('pyproject.toml') }}
@@ -192,15 +201,15 @@ jobs:
192201 echo "pyconverter.xml2py version is: $(python -c 'from pyconverter.xml2py import __version__; print(__version__)')"
193202
194203 - name : " Cache docs build directory"
195- uses : actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
204+ uses : actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 # zizmor: ignore[cache-poisoning]
196205 with :
197206 path : doc/_build
198207 key : doc-build-pyconverter-xml2py-v${{ env.RESET_DOC_BUILD_CACHE }}-${{ env.PYCONVERTER_VERSION }}-${{ github.sha }}
199208 restore-keys : |
200209 doc-build-pyconverter-xml2py-v${{ env.RESET_DOC_BUILD_CACHE }}-${{ env.PYCONVERTER_VERSION }}
201210
202211 - name : " Cache autosummary"
203- uses : actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
212+ uses : actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 # zizmor: ignore[cache-poisoning]
204213 with :
205214 path : doc/source/**/_autosummary/**/*.rst
206215 key : autosummary-pyconverter-xml2py-v${{ env.RESET_AUTOSUMMARY_CACHE }}-${{ env.PYCONVERTER_VERSION }}-${{ github.sha }}
@@ -277,6 +286,8 @@ jobs:
277286 # Deploy release documentation when creating a new tag
278287 if : github.event_name == 'push' && contains(github.ref, 'refs/tags')
279288 runs-on : ubuntu-latest
289+ permissions :
290+ contents : write
280291 needs : [release, release-pypi]
281292 steps :
282293 - name : " Deploy the stable documentation"
@@ -293,6 +304,8 @@ jobs:
293304 # Deploy development only when merging to main
294305 if : github.ref == 'refs/heads/main'
295306 runs-on : ubuntu-latest
307+ permissions :
308+ contents : write
296309 needs : [package]
297310 steps :
298311 - name : " Deploy the latest documentation"
0 commit comments