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.
This commit is contained in:
1 file changed
+12
-3
@@ -4,12 +4,21 @@ inputs:
|
|||||||
cache-provider:
|
cache-provider:
|
||||||
description: 'gha or cirrus cache provider'
|
description: 'gha or cirrus cache provider'
|
||||||
required: true
|
required: true
|
||||||
options:
|
|
||||||
- gh
|
|
||||||
- cirrus
|
|
||||||
runs:
|
runs:
|
||||||
using: 'composite'
|
using: 'composite'
|
||||||
steps:
|
steps:
|
||||||
|
- name: Check inputs
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
# We expect only gha or cirrus as inputs to cache-provider
|
||||||
|
case "${{ inputs.cache-provider }}" in
|
||||||
|
gha|cirrus)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "::warning title=Unknown input to configure docker action::Provided value was ${{ inputs.cache-provider }}"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
with:
|
with:
|
||||||
|
|||||||
Reference in new issue
Block a user