Skip to content

Commit 61bbe28

Browse files
committed
CI: Support check mode for package promotion
1 parent 57e54bb commit 61bbe28

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/workflows/package-promote.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ on:
1212
required: false
1313
description: Branch of StackHPC Kayobe configuration to use
1414
default: stackhpc/wallaby
15+
check-mode:
16+
description: Check mode
17+
type: boolean
18+
required: false
19+
default: false
1520

1621
env:
1722
ANSIBLE_FORCE_COLOR: True
@@ -39,11 +44,18 @@ jobs:
3944

4045
- name: Promote package repositories in Ark to release
4146
run: |
47+
args=""
48+
if [[ $CHECK_MODE = true ]]; then
49+
args="$args --check --diff"
50+
fi
51+
source venv/bin/activate &&
4252
ansible-playbook -i ansible/inventory \
4353
ansible/dev-pulp-repo-version-query-kayobe.yml \
4454
ansible/dev-pulp-repo-promote.yml \
4555
-e deb_package_repo_filter="'$FILTER'" \
4656
-e rpm_package_repo_filter="'$FILTER'" \
47-
-e kayobe_config_repo_path=./stackhpc-kayobe-config/
57+
-e kayobe_config_repo_path=./stackhpc-kayobe-config/ \
58+
$args
4859
env:
4960
FILTER: ${{ github.event.inputs.filter }}
61+
CHECK_MODE: ${{ inputs.check-mode }}

0 commit comments

Comments
 (0)