Skip to content

Commit 967e044

Browse files
committed
add optional submit to certify image action, default to true
1 parent d372e25 commit 967e044

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.github/actions/certify-openshift-image/action.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ inputs:
1919
description: A comma separated list of architectures in the image manifest to certify
2020
required: false
2121
default: ""
22+
submit:
23+
description: Submit results to Redhat PYAXIS
24+
required: false
25+
default: true
2226

2327
outputs:
2428
result:
@@ -43,14 +47,14 @@ runs:
4347
IFS=',' read -ra arch_list <<< "${{ inputs.platforms }}"
4448
for arch in "${arch_list[@]}"; do
4549
architecture=("${arch#*/}")
46-
./preflight check container ${{ inputs.image }} --pyxis-api-token ${{ inputs.pyxis_token }} --certification-project-id ${{ inputs.project_id }} --platform $architecture --submit
50+
./preflight check container ${{ inputs.image }} --pyxis-api-token ${{ inputs.pyxis_token }} --certification-project-id ${{ inputs.project_id }} --platform $architecture ${{ inputs.submit && '--submit' || '' }}
4751
if [ $? -ne 0 ]; then
4852
result=1
4953
fi
5054
done
5155
else
5256
# no platforms passed, this is either a manifest or a single platform image
53-
./preflight check container ${{ inputs.image }} --pyxis-api-token ${{ inputs.pyxis_token }} --certification-project-id ${{ inputs.project_id }} --submit
57+
./preflight check container ${{ inputs.image }} --pyxis-api-token ${{ inputs.pyxis_token }} --certification-project-id ${{ inputs.project_id }} ${{ inputs.submit && '--submit' || '' }}
5458
result=$?
5559
fi
5660
echo "result=$result" >> $GITHUB_OUTPUT

.github/workflows/update-docker-images.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,4 +184,4 @@ jobs:
184184
project_id: ${{ secrets.CERTIFICATION_PROJECT_ID }}
185185
pyxis_token: ${{ secrets.PYXIS_API_TOKEN }}
186186
platforms: ""
187-
if: ${{ ! inputs.dry_run || false }}
187+
submit: ${{ ! inputs.dry_run || true }}

0 commit comments

Comments
 (0)