Skip to content

Commit 53d7645

Browse files
committed
ci(ct): add input options for dry and damp runs in maintenance workflow
1 parent 4062ba1 commit 53d7645

1 file changed

Lines changed: 15 additions & 8 deletions

File tree

.github/workflows/container_maintenance.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,16 @@ on:
1212
required: false
1313
default: false
1414
description: "Build and deploy even if no newer Java images or package updates are found."
15+
dry_run:
16+
type: boolean
17+
required: false
18+
default: false
19+
description: "Run in dry-run mode (no builds, verify logic)"
20+
damp_run:
21+
type: boolean
22+
required: false
23+
default: false
24+
description: "Run in damp-run mode (build but don't push)"
1525
schedule:
1626
- cron: '23 3 * * 0' # Run for 'develop' every Sunday at 03:23 UTC
1727

@@ -80,11 +90,10 @@ jobs:
8090
# Execute matrix build for the discovered branches
8191
- name: Execute build matrix script
8292
id: execute
83-
env:
84-
# TODO: Remove once we are sure this works as intended
85-
DRY_RUN: 1
8693
run: >
8794
FORCE_BUILD=$( [[ "${{ inputs.force_build }}" = "true" ]] && echo 1 || echo 0 )
95+
DRY_RUN=$( [[ "${{ inputs.dry_run }}" = "true" ]] && echo 1 || echo 0 )
96+
DAMP_RUN=$( [[ "${{ inputs.damp_run }}" = "true" ]] && echo 1 || echo 0 )
8897
DEVELOPMENT_BRANCH=${{ needs.discover.outputs.develop-branch }}
8998
.github/workflows/scripts/containers/maintain-base.sh ${{ needs.discover.outputs.branches }}
9099
@@ -122,11 +131,10 @@ jobs:
122131
# Execute matrix build for the discovered branches
123132
- name: Execute build matrix script
124133
id: execute
125-
env:
126-
# TODO: Remove once we are sure this works as intended
127-
DRY_RUN: 1
128134
run: >
129135
FORCE_BUILD=$( [[ "${{ inputs.force_build }}" = "true" ]] && echo 1 || echo 0 )
136+
DRY_RUN=$( [[ "${{ inputs.dry_run }}" = "true" ]] && echo 1 || echo 0 )
137+
DAMP_RUN=$( [[ "${{ inputs.damp_run }}" = "true" ]] && echo 1 || echo 0 )
130138
DEVELOPMENT_BRANCH=${{ needs.discover.outputs.develop-branch }}
131139
.github/workflows/scripts/containers/maintain-application.sh ${{ needs.discover.outputs.branches }}
132140
@@ -137,8 +145,6 @@ jobs:
137145
contents: read
138146
packages: read
139147
needs: base-image
140-
# TODO: Remove once we are sure all of this works...
141-
if: false
142148
steps:
143149
- name: Checkout repository
144150
uses: actions/checkout@v4
@@ -157,6 +163,7 @@ jobs:
157163
sed -i -e "/<\!-- TAG BLOCK HERE -->/r ${GITHUB_WORKSPACE}/tags.md" "./modules/container-base/README.md"
158164
159165
- name: Push description to DockerHub
166+
if: ${{ ! inputs.dry_run && ! inputs.damp_run }}
160167
uses: peter-evans/dockerhub-description@v4
161168
with:
162169
username: ${{ secrets.DOCKERHUB_USERNAME }}

0 commit comments

Comments
 (0)