handle branch rename from develop to main in github actions (#2748) #2986
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run pre-commit | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
- release/\d{4}.\d{1,2}.\d{1,2} | |
pull_request: | |
jobs: | |
pre-commit: | |
if: github.event.pull_request.merged == false | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- name: Checkout repository 🔔 | |
uses: actions/[email protected] | |
- name: Run terraform pre-commit ⚡️ | |
uses: pre-commit/[email protected] | |
with: | |
extra_args: --all-files terraform_fmt |