Skip to content

Commit 69edd4b

Browse files
Download cfn-guard in pr-linter action
1 parent 69de00e commit 69edd4b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/pr-linter.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,19 @@ jobs:
111111
echo "files_changed=false" >> $GITHUB_OUTPUT
112112
fi
113113
114+
- name: Install cfn-guard
115+
if: steps.filter_files.outputs.files_changed == 'true'
116+
run: |
117+
mkdir -p $HOME/.local/bin
118+
curl -L -o cfn-guard.tar.gz https://github.com/aws-cloudformation/cloudformation-guard/releases/latest/download/cfn-guard-v3-x86_64-ubuntu-latest.tar.gz
119+
tar -xzf cfn-guard.tar.gz
120+
mv cfn-guard-v3-*/cfn-guard $HOME/.local/bin/cfn-guard
121+
chmod +x $HOME/.local/bin/cfn-guard
122+
echo "$HOME/.local/bin" >> $GITHUB_PATH
123+
124+
114125
- name: Install & Build cfn-guard-custom-rules-tool
126+
if: steps.filter_files.outputs.files_changed == 'true'
115127
run: yarn install --frozen-lockfile && cd tools/@aws-cdk/cfn-guard-custom-rules-tool && yarn build
116128

117129
- name: Run cfn-guard if templates changed

0 commit comments

Comments
 (0)