Skip to content

Commit 968d683

Browse files
Merge pull request #81 from WarehouseFinds/fix/workflow_cleanup
Refine CI workflow and cleanup process
2 parents 914d9db + acf8293 commit 968d683

File tree

2 files changed

+4
-19
lines changed

2 files changed

+4
-19
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
11
name: CI
2-
run-name: CI • ${{ github.repository }} • ${{ github.event_name }} • ${{ github.ref_name }}
2+
run-name: CI Workflow • ${{ github.repository }} • ${{ github.event_name }} • ${{ github.ref_name }}
33
permissions: read-all
44

55
on:
66
workflow_dispatch:
77
inputs:
88
version-tag:
9-
description: 'Version tag to use (e.g., 0.9.7 or v0.9.7) - leave empty to use current commit'
9+
description: 'Version tag (e.g., v0.9.7) - leave empty to use last commit'
1010
required: false
1111
type: string
1212

13-
publish:
14-
description: 'Publish release to PSGallery'
15-
required: false
16-
type: boolean
17-
default: false
1813
push:
1914
branches:
2015
- main
@@ -87,7 +82,6 @@ jobs:
8782
contents: write
8883
with:
8984
version-tag: ${{ inputs['version-tag'] || '' }}
90-
publish: ${{ inputs['publish'] || false }}
9185
module-list: ${{ needs.setup.outputs.module-list }}
9286
secrets:
9387
NUGETAPIKEY_PSGALLERY: ${{ secrets.NUGETAPIKEY_PSGALLERY }}

.github/workflows/cron-cleanup-workflow-runs.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,16 @@ jobs:
2525
actions: write
2626
contents: read
2727
steps:
28-
- name: Delete workflow runs (Pull Requests)
28+
- name: Delete workflow runs (CI workflows)
2929
uses: Mattraks/delete-workflow-runs@5bf9a1dac5c4d041c029f0a8370ddf0c5cb5aeb7 #v2.1
3030
with:
3131
token: ${{ github.token }}
3232
repository: ${{ github.repository }}
33-
delete_workflow_pattern: "CI • ${{ github.repository }} • push • pull_request"
33+
delete_workflow_pattern: "CI"
3434
retain_days: ${{ github.event.inputs.retain-days || 2 }}
3535
keep_minimum_runs: ${{ github.event.inputs.minimum-runs || 2 }}
3636
check_pullrequest_exist: true
3737

38-
- name: Delete workflow runs (Push in main branch)
39-
uses: Mattraks/delete-workflow-runs@5bf9a1dac5c4d041c029f0a8370ddf0c5cb5aeb7 #v2.1
40-
with:
41-
token: ${{ github.token }}
42-
repository: ${{ github.repository }}
43-
delete_workflow_pattern: "CI • ${{ github.repository }} • push • main"
44-
retain_days: ${{ github.event.inputs.retain-days || 2 }}
45-
keep_minimum_runs: ${{ github.event.inputs.minimum-runs || 2 }}
46-
4738
- name: Delete workflow runs (Scheduled cleanup runs)
4839
uses: Mattraks/delete-workflow-runs@5bf9a1dac5c4d041c029f0a8370ddf0c5cb5aeb7 #v2.1
4940
with:

0 commit comments

Comments
 (0)