Skip to content

Commit 421dc70

Browse files
committed
Connected PublishOnPyPI and PublishToGitHubPages to cleanup parameter.
1 parent 532742e commit 421dc70

3 files changed

Lines changed: 14 additions & 2 deletions

File tree

.github/workflows/CompletePipeline.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,7 @@ jobs:
425425
doc: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_html }}
426426
coverage: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }}
427427
typing: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).statictyping_html }}
428+
cleanup: ${{ inputs.cleanup }}
428429

429430
TriggerTaggedRelease:
430431
uses: pyTooling/Actions/.github/workflows/TagReleaseCommit.yml@dev
@@ -475,6 +476,7 @@ jobs:
475476
python_version: ${{ needs.UnitTestingParams.outputs.python_version }}
476477
requirements: '-r dist/requirements.txt'
477478
artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).package_all }}
479+
cleanup: ${{ inputs.cleanup }}
478480
secrets:
479481
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
480482

.github/workflows/PublishOnPyPI.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ on:
4444
description: 'Name of the package artifact.'
4545
required: true
4646
type: string
47+
cleanup:
48+
description: 'Cleanup artifacts afterwards.'
49+
required: false
50+
default: 'true'
51+
type: string
4752
secrets:
4853
PYPI_TOKEN:
4954
description: "Token for pushing releases to PyPI"
@@ -83,5 +88,6 @@ jobs:
8388

8489
- name: 🗑️ Delete packaging Artifacts
8590
uses: geekyeggo/delete-artifact@v6
91+
if: inputs.cleanup == 'true'
8692
with:
8793
name: ${{ inputs.artifact }}

.github/workflows/PublishToGitHubPages.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,11 @@ on:
4949
required: false
5050
default: 'github-pages'
5151
type: string
52-
52+
cleanup:
53+
description: 'Cleanup artifacts afterwards.'
54+
required: false
55+
default: 'true'
56+
type: string
5357
outputs:
5458
github_pages_url:
5559
description: "URL to GitHub Pages."
@@ -109,6 +113,6 @@ jobs:
109113

110114
- name: 🗑️ Delete GitHub Pages artifact
111115
uses: geekyeggo/delete-artifact@v6
112-
if: github.event_name != 'pull_request'
116+
if: github.event_name != 'pull_request' && inputs.cleanup == 'true'
113117
with:
114118
name: ${{ inputs.pages }}

0 commit comments

Comments
 (0)