From 990e11f87844f844fd5a4b8230bcf040e49c80a5 Mon Sep 17 00:00:00 2001 From: Ziv Nevo <79099626+zivnevo@users.noreply.github.com> Date: Thu, 26 Aug 2021 14:57:27 +0300 Subject: [PATCH] Allow multiple policies --- action.yaml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/action.yaml b/action.yaml index f091529..4ec3e5c 100644 --- a/action.yaml +++ b/action.yaml @@ -21,8 +21,23 @@ runs: - uses: actions/checkout@v2 with: path: repo + - run: | + for policy in ${{ inputs.corporate-policies }} + do + export POLICIES_WITH_B="-b $policy $POLICIES_WITH_B" + done + echo "::set-output name=policies-with-b::$(echo $POLICIES_WITH_B)" + shell: bash + id: add-b-flag - name: Baseline requirements validation uses: docker://ghcr.io/shift-left-netconfig/baseline-rules-verifier:1.1 with: - args: -b ${{ inputs.corporate-policies }} -r /github/workspace/repo/${{ inputs.deployment-path }} /github/workspace/repo/${{ inputs.netpol-path }} --pr_url https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.number }}/comments --tmp_dir /tmp --gh_token ${{ github.token }} --nca_path /nca + args: > + ${{ steps.add-b-flag.outputs.policies-with-b }} + -r /github/workspace/repo/${{ inputs.deployment-path }} + /github/workspace/repo/${{ inputs.netpol-path }} + --pr_url https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.number }}/comments + --tmp_dir /tmp + --gh_token ${{ github.token }} + --nca_path /nca