Skip to content

pre-portal FW rules #4341

pre-portal FW rules

pre-portal FW rules #4341

Workflow file for this run

name: pre-commit
on:
pull_request:
push:
branches: [master]
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3
with:
repository: hmcts/cnp-azuredevops-libraries
path: cnp-azuredevops-libraries
- name: Setup Script
run: |
chmod +x cnp-azuredevops-libraries/scripts/tfenv-install-terraform.sh
- name: Setup Terraform
run: ./cnp-azuredevops-libraries/scripts/tfenv-install-terraform.sh
working-directory: ./
shell: bash
- name: Setup Python
uses: actions/setup-python@v4
- name: Create virtual environment
run: python3 -m venv venv
- name: Activate virtual environment and install pre-commit
run: |
source venv/bin/activate
python -m pip install pre-commit
shell: bash
- uses: pre-commit/[email protected]
with:
extra_args: terraform_fmt --all-files
continue-on-error: true
- uses: stefanzweifel/git-auto-commit-action@v4
with:
file_pattern: environments/* components/*
- uses: pre-commit/[email protected]
with:
extra_args: app_gateway_backend_check --all-files