Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: '0 7 * * *'
workflow_dispatch:

env:
LW_ACCOUNT_NAME: ${{ secrets.LW_ACCOUNT_CAT }}
Expand Down
27 changes: 2 additions & 25 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,42 +59,19 @@ runs:
echo "Lacework context ID: $LACEWORK_CONTEXT_ID"
echo "LACEWORK_CONTEXT_ID=$(echo $LACEWORK_CONTEXT_ID)" >> $GITHUB_ENV
echo "LACEWORK_ACTION_REF=$(echo $LACEWORK_ACTION_REF)" >> $GITHUB_ENV
SCA_VERSION=0.1.23
curl https://raw.githubusercontent.com/lacework/go-sdk/main/cli/install.sh | bash
KEY="$(date +'%Y-%m-%d')"
KEY="$KEY-$RUNNER_OS-$RUNNER_ARCH"
KEY="$KEY-sca-$SCA_VERSION"
echo "sca-version=$SCA_VERSION" >> $GITHUB_OUTPUT
HASH="$(echo $KEY | md5sum | head -c 8)"
echo "cache-key=$HASH" >> $GITHUB_OUTPUT
- id: cache
uses: actions/cache/restore@v3
with:
path: ~/.config/lacework/components
key: lacework-${{ steps.init.outputs.cache-key }}
- name: Sets LW_LOG var for debug
shell: bash
if: ${{ inputs.debug == 'true' }}
run: |
echo "LW_LOG=debug" >> $GITHUB_ENV
- if: steps.cache.outputs.cache-hit != 'true'
- name: Install Lacework CLI component
shell: bash
run: |
echo "::group::Installing Lacework CLI components"
if [[ "${{ steps.init.outputs.sca-version }}" != "" ]]; then
lacework --noninteractive -a "${LW_ACCOUNT_NAME}" -k "${LW_API_KEY}" -s "${LW_API_SECRET}" component install sca --version "${{ steps.init.outputs.sca-version }}"
fi
echo "::endgroup::"
echo "::group::Printing Lacework CLI information"
lacework --noninteractive -a "${LW_ACCOUNT_NAME}" -k "${LW_API_KEY}" -s "${LW_API_SECRET}" component install sca
lacework --noninteractive -a "${LW_ACCOUNT_NAME}" -k "${LW_API_KEY}" -s "${LW_API_SECRET}" version
echo "::endgroup::"
env:
CDK_DOWNLOAD_TIMEOUT_MINUTES: 2
- if: steps.cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v3
with:
path: ~/.config/lacework/components
key: lacework-${{ steps.init.outputs.cache-key }}
- uses: actions/setup-node@v3
with:
node-version: 16
Expand Down