Skip to content

fix: restore truncated pre-commit config with complete checkov hooks … #123

fix: restore truncated pre-commit config with complete checkov hooks …

fix: restore truncated pre-commit config with complete checkov hooks … #123

Workflow file for this run

---
# yamllint disable rule:line-length
name: Verify and Bump
on:
workflow_dispatch:
push:
branches:
- main
jobs:
terraform:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: main
token: ${{ github.token }}
fetch-depth: '0'
- name: Config Terraform plugin cache
run: |
echo 'plugin_cache_dir="$HOME/.terraform.d/plugin-cache"' >~/.terraformrc
mkdir --parents ~/.terraform.d/plugin-cache
- name: Cache Terraform
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: |
~/.terraform.d/plugin-cache
key: ${{ runner.os }}-terraform-${{ hashFiles('**/.terraform.lock.hcl') }}
restore-keys: |
${{ runner.os }}-terraform-
- name: Terraform Init
uses: hashicorp/terraform-github-actions@b2ca17c0c25198c67c668c37edcbc45ca086a91e # v0.8.0
with:
tf_actions_version: 1.0.1
tf_actions_subcommand: init
tf_actions_working_dir: example/examplea
- name: Terraform Validate
uses: hashicorp/terraform-github-actions@b2ca17c0c25198c67c668c37edcbc45ca086a91e # v0.8.0
with:
tf_actions_version: 1.0.1
tf_actions_subcommand: validate
tf_actions_working_dir: example/examplea
- name: Terraform Plan
uses: hashicorp/terraform-github-actions@b2ca17c0c25198c67c668c37edcbc45ca086a91e # v0.8.0
with:
tf_actions_version: 1.0.1
tf_actions_subcommand: plan
tf_actions_working_dir: example/examplea
env:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
security:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: main
token: ${{ github.token }}
fetch-depth: '0'
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: 3.11
- run: |
pip3 install lastversion
lastversion terraform-docs --assets -d --verbose
mkdir $GITHUB_WORKSPACE/bin
tar -xvf terraform-docs*.tar.gz --directory $GITHUB_WORKSPACE/bin
chmod +x $GITHUB_WORKSPACE/bin/terraform-docs
echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
version:
name: versioning
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: '0'
- name: Bump version and push tag
uses: anothrNick/github-tag-action@4ed44965e0db8dab2b466a16da04aec3cc312fd8 # 1.75.0
env:
GITHUB_TOKEN: ${{ github.token }}
DEFAULT_BUMP: patch
WITH_V: true
needs: [terraform, security]