Skip to content

Add Exercise 3 and 4 #39

Add Exercise 3 and 4

Add Exercise 3 and 4 #39

Workflow file for this run

name: Run pre-commit
on:
pull_request:
push:
branches: [main]
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: setup setup-python
uses: actions/setup-python@v5
- name: Install tflint
env:
TFLINT_VERSION: 0.48.0
INSTALL_PATH: /usr/local/bin
run: |
set -euo pipefail
platform=$(uname -s | tr '[:upper:]' '[:lower:]')
arch=$(uname -m)
if [ "$arch" == "x86_64" ]; then
arch="amd64"
fi
filename="tflint_${platform}_${arch}.zip"
curl -s -LO "https://github.com/terraform-linters/tflint/releases/download/v${TFLINT_VERSION}/${filename}"
unzip $filename -d "${INSTALL_PATH}"
- name: Install Trivy
env:
TRIVY_VERSION: 0.49.0
run: |
set -euo pipefail
curl --retry 3 --retry-delay 5 -sSL "https://github.com/aquasecurity/trivy/releases/download/v${TRIVY_VERSION}/trivy_${TRIVY_VERSION}_Linux-64bit.tar.gz" | tar xz -C /usr/local/bin --overwrite
- name: Install pre-commit framework
env:
PRE_COMMIT_VERSION: 3.4.0
run: |
pip install pre-commit==${PRE_COMMIT_VERSION}
- name: Run pre-commit
run: pre-commit run --all-files --show-diff-on-failure --color=auto