Skip to content

Commit 34fe70e

Browse files
committed
ci: individual dry run selection
1 parent b46a5f2 commit 34fe70e

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

.github/workflows/image-cleanup.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ on:
66
- cron: "0 0 * * 3"
77
workflow_dispatch:
88
inputs:
9-
dry-run:
9+
image-cleanup-dry-run:
10+
default: false
11+
type: boolean
12+
attestation-cleanup-dry-run:
1013
default: false
1114
type: boolean
1215

@@ -26,7 +29,6 @@ jobs:
2629
- uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
2730
with:
2831
disable-sudo-and-containers: true
29-
egress-policy: audit
3032
allowed-endpoints: api.github.com:443
3133
- name: Collect package digests
3234
run: |
@@ -65,7 +67,7 @@ jobs:
6567
with:
6668
delete-orphaned-images: true
6769
delete-untagged: true
68-
dry-run: ${{ inputs.dry-run == true }}
70+
dry-run: ${{ inputs.image-cleanup-dry-run == true }}
6971
packages: amp-devcontainer-base,amp-devcontainer-cpp,amp-devcontainer-rust
7072

7173
cleanup-attestations:
@@ -83,7 +85,6 @@ jobs:
8385
- uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
8486
with:
8587
disable-sudo-and-containers: true
86-
egress-policy: audit
8788
allowed-endpoints: api.github.com:443
8889
- uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
8990
id: download-digests
@@ -125,7 +126,7 @@ jobs:
125126
echo "$orphaned" | jq -R . | jq -sc '{subject_digests: .}' | \
126127
gh api --method POST "/orgs/${ORG}/attestations/delete-request" --input -
127128
env:
128-
DRY_RUN: ${{ inputs.dry-run == true }}
129+
DRY_RUN: ${{ inputs.attestation-cleanup-dry-run == true }}
129130
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
130131
GH_REPO: ${{ github.repository }}
131132
GH_PACKAGE: ${{ matrix.package }}

0 commit comments

Comments
 (0)