Skip to content

Commit

Permalink
feat: add an input "policy_allow" to run "aqua policy allow"
Browse files Browse the repository at this point in the history
  • Loading branch information
suzuki-shunsuke committed Mar 27, 2023
1 parent 57c2c2d commit c0a879a
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ inputs:
aqua_opts:
required: false
default: "-l"
policy_allow:
required: false
description: |
aqua >= v2.3.0
If this isn't empty, "aqua policy allow" is run.
If this is "true", "aqua policy allow" is run without argument.
If this isn't empty and isn't "true", "aqua policy allow <inputs.policy_allow>" is run.
working_directory:
required: false
default: ""
Expand Down Expand Up @@ -48,6 +56,19 @@ runs:
env:
AQUA_VERSION: ${{ inputs.aqua_version }}
- run: aqua policy allow
working-directory: ${{ inputs.working_directory }}
if: inputs.policy_allow == 'true'
shell: bash

- run: aqua policy allow "$POLICY_FILE"
working-directory: ${{ inputs.working_directory }}
if: |
inputs.policy_allow != 'true' && inputs.policy_allow != ''
shell: bash
env:
POLICY_FILE: ${{ inputs.policy_allow }}

- run: aqua i $AQUA_OPTS
working-directory: ${{ inputs.working_directory }}
shell: bash
Expand Down

0 comments on commit c0a879a

Please sign in to comment.