generated from Azure/terraform-azurerm-avm-template
-
Notifications
You must be signed in to change notification settings - Fork 3
/
action.yml
28 lines (26 loc) · 825 Bytes
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
author: AVM
name: avmfix
description: Ensures that avmfix has been run.
runs:
using: composite
steps:
- name: run avmfix
shell: bash
run: |
docker run --rm -v $(pwd):/src -w /src mcr.microsoft.com/azterraform make autofix
- name: detect changes
shell: bash
run: |
if [ -z $(git status -s) ]; then
echo "No changes detected"
exit 0
else
echo "AVMfix changes detected, please run:"
echo "> docker run --rm -v $(pwd):/src -w /src mcr.microsoft.com/azterraform make pre-commit"
echo "... or if you have the avm helper script installed:"
echo "> ./avm pre-commit"
echo "> avm.bat pre-commit (on Windows)"
echo
echo "Then commit and push the changes"
exit 1
fi