@@ -59,42 +59,19 @@ runs:
5959 echo "Lacework context ID: $LACEWORK_CONTEXT_ID"
6060 echo "LACEWORK_CONTEXT_ID=$(echo $LACEWORK_CONTEXT_ID)" >> $GITHUB_ENV
6161 echo "LACEWORK_ACTION_REF=$(echo $LACEWORK_ACTION_REF)" >> $GITHUB_ENV
62- SCA_VERSION=0.1.23
6362 curl https://raw.githubusercontent.com/lacework/go-sdk/main/cli/install.sh | bash
64- KEY="$(date +'%Y-%m-%d')"
65- KEY="$KEY-$RUNNER_OS-$RUNNER_ARCH"
66- KEY="$KEY-sca-$SCA_VERSION"
67- echo "sca-version=$SCA_VERSION" >> $GITHUB_OUTPUT
68- HASH="$(echo $KEY | md5sum | head -c 8)"
69- echo "cache-key=$HASH" >> $GITHUB_OUTPUT
70- - id : cache
71- uses : actions/cache/restore@v3
72- with :
73- path : ~/.config/lacework/components
74- key : lacework-${{ steps.init.outputs.cache-key }}
7563 - name : Sets LW_LOG var for debug
7664 shell : bash
7765 if : ${{ inputs.debug == 'true' }}
7866 run : |
7967 echo "LW_LOG=debug" >> $GITHUB_ENV
80- - if : steps.cache.outputs.cache-hit != 'true'
68+ - name : Install Lacework CLI component
8169 shell : bash
8270 run : |
83- echo "::group::Installing Lacework CLI components"
84- if [[ "${{ steps.init.outputs.sca-version }}" != "" ]]; then
85- lacework --noninteractive -a "${LW_ACCOUNT_NAME}" -k "${LW_API_KEY}" -s "${LW_API_SECRET}" component install sca --version "${{ steps.init.outputs.sca-version }}"
86- fi
87- echo "::endgroup::"
88- echo "::group::Printing Lacework CLI information"
71+ lacework --noninteractive -a "${LW_ACCOUNT_NAME}" -k "${LW_API_KEY}" -s "${LW_API_SECRET}" component install sca
8972 lacework --noninteractive -a "${LW_ACCOUNT_NAME}" -k "${LW_API_KEY}" -s "${LW_API_SECRET}" version
90- echo "::endgroup::"
9173 env :
9274 CDK_DOWNLOAD_TIMEOUT_MINUTES : 2
93- - if : steps.cache.outputs.cache-hit != 'true'
94- uses : actions/cache/save@v3
95- with :
96- path : ~/.config/lacework/components
97- key : lacework-${{ steps.init.outputs.cache-key }}
9875 - uses : actions/setup-node@v3
9976 with :
10077 node-version : 16
0 commit comments