From c0a879a13120ec4d55cadc8fc606ff296cd60b91 Mon Sep 17 00:00:00 2001 From: Shunsuke Suzuki Date: Mon, 27 Mar 2023 15:34:12 +0900 Subject: [PATCH] feat: add an input "policy_allow" to run "aqua policy allow" https://github.com/aquaproj/aqua/issues/1789#issuecomment-1484041118 --- action.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/action.yaml b/action.yaml index 4996f32..4150722 100644 --- a/action.yaml +++ b/action.yaml @@ -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 " is run. + working_directory: required: false default: "" @@ -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