Skip to content

Commit 7632e0b

Browse files
committed
ci: fix configure docker action inputs
The options used were wrong in two ways: firstly they were not enforced as a "choice" (i.e. invalid input valudes could be provided without error) and one of the options was listed as `gh` when we passed it as `gha` from ci.yml. "Fix" this by removing the choice altogether but sanity-testing the input value against an expected list using a GHA "warning" to notify of unknown inputs.
1 parent 0b3b8a3 commit 7632e0b

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

.github/actions/configure-docker/action.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,21 @@ inputs:
44
cache-provider:
55
description: 'gha or cirrus cache provider'
66
required: true
7-
options:
8-
- gh
9-
- cirrus
107
runs:
118
using: 'composite'
129
steps:
10+
- name: Check inputs
11+
shell: bash
12+
run: |
13+
# We expect only gha or cirrus as inputs to cache-provider
14+
case "${{ inputs.cache-provider }}" in
15+
gha|cirrus)
16+
;;
17+
*)
18+
echo "::warning title=Unknown input to configure docker action::Provided value was ${{ inputs.cache-provider }}"
19+
;;
20+
esac
21+
1322
- name: Set up Docker Buildx
1423
uses: docker/setup-buildx-action@v3
1524
with:

0 commit comments

Comments
 (0)