---
name: enos_fmt
on:
pull_request:
paths:
- enos/**
jobs:
fmt_check:
# Only run this workflow on pull requests from hashicorp/vault branches
# as we need secrets to install enos.
if: "! github.event.pull_request.head.repo.fork"
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- uses: hashicorp/setup-terraform@v2
with:
terraform_wrapper: false
- uses: hashicorp/action-setup-enos@v1
github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
- name: check formatting
working-directory: ./enos
run: make check-fmt