Skip to content

Commit

Permalink
update: use 'choice' input for mode
Browse files Browse the repository at this point in the history
Signed-off-by: Lorenzo Susini <[email protected]>
  • Loading branch information
loresuso committed Nov 6, 2024
1 parent 891960f commit b2eb104
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 deletions.
12 changes: 4 additions & 8 deletions start/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ author: 'The Falco Authors'
inputs:
mode:
description: 'Start action with a mode. Can be live or analyze'
type: string
type: choice
options:
- live
- analyze
required: false
default: 'live'
falco-version:
Expand All @@ -30,13 +33,6 @@ inputs:
runs:
using: 'composite'
steps:
- name: Validate mode
shell: bash
run: |
if [[ "${{ inputs.mode }}" != "live" && "${{ inputs.mode }}" != "analyze" ]]; then
echo "Invalid mode. Must be either live or analyze"
exit 1
fi
- name: Start Falco
if: ${{ inputs.mode == 'live' }}
shell: bash
Expand Down
12 changes: 4 additions & 8 deletions stop/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ author: 'The Falco Authors'
inputs:
mode:
description: 'Stop action with a mode. Can be live or analyze'
type: choice
options:
- live
- analyze
required: false
default: 'live'
verbose:
Expand All @@ -13,14 +17,6 @@ inputs:
runs:
using: 'composite'
steps:
- name: Validate mode
shell: bash
run: |
if [[ "${{ inputs.mode }}" != "live" && "${{ inputs.mode }}" != "analyze" ]]; then
echo "Invalid mode. Must be either live or analyze"
exit 1
fi
- name: Stop Falco or Sysdig containers
shell: bash
continue-on-error: true
Expand Down

0 comments on commit b2eb104

Please sign in to comment.