@@ -63,42 +63,25 @@ runs:
6363 echo "Lacework context ID: $LACEWORK_CONTEXT_ID"
6464 echo "LACEWORK_CONTEXT_ID=$(echo $LACEWORK_CONTEXT_ID)" >> $GITHUB_ENV
6565 echo "LACEWORK_ACTION_REF=$(echo $LACEWORK_ACTION_REF)" >> $GITHUB_ENV
66- SCA_VERSION=0.1.23
6766 curl https://raw.githubusercontent.com/lacework/go-sdk/main/cli/install.sh | bash
68- KEY="$(date +'%Y-%m-%d')"
69- KEY="$KEY-$RUNNER_OS-$RUNNER_ARCH"
70- KEY="$KEY-sca-$SCA_VERSION"
71- echo "sca-version=$SCA_VERSION" >> $GITHUB_OUTPUT
72- HASH="$(echo $KEY | md5sum | head -c 8)"
73- echo "cache-key=$HASH" >> $GITHUB_OUTPUT
74- - id : cache
75- uses : actions/cache/restore@v3
76- with :
77- path : ~/.config/lacework/components
78- key : lacework-${{ steps.init.outputs.cache-key }}
7967 - name : Sets LW_LOG var for debug
8068 shell : bash
8169 if : ${{ inputs.debug == 'true' }}
8270 run : |
8371 echo "LW_LOG=debug" >> $GITHUB_ENV
84- - if : steps.cache.outputs.cache-hit != 'true'
72+ - name : Install Lacework CLI component
8573 shell : bash
8674 run : |
8775 echo "::group::Installing Lacework CLI components"
8876 if [[ "${{ steps.init.outputs.sca-version }}" != "" ]]; then
89- lacework --noninteractive -a "${LW_ACCOUNT_NAME}" -k "${LW_API_KEY}" -s "${LW_API_SECRET}" component install sca --version "${{ steps.init.outputs.sca-version }} "
77+ lacework --noninteractive -a "${LW_ACCOUNT_NAME}" -k "${LW_API_KEY}" -s "${LW_API_SECRET}" component install sca"
9078 fi
9179 echo "::endgroup::"
9280 echo "::group::Printing Lacework CLI information"
9381 lacework --noninteractive -a "${LW_ACCOUNT_NAME}" -k "${LW_API_KEY}" -s "${LW_API_SECRET}" version
9482 echo "::endgroup::"
9583 env :
9684 CDK_DOWNLOAD_TIMEOUT_MINUTES : 2
97- - if : steps.cache.outputs.cache-hit != 'true'
98- uses : actions/cache/save@v3
99- with :
100- path : ~/.config/lacework/components
101- key : lacework-${{ steps.init.outputs.cache-key }}
10285 - uses : actions/setup-node@v3
10386 with :
10487 node-version : 16
0 commit comments