remove suffix #9
Workflow file for this run
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
# Runs auto-formatting script on push to any branch | |
name: "Run terraform formatting" | |
on: | |
push: | |
branches-ignore: | |
- main | |
workflow_call: | |
permissions: | |
id-token: write | |
contents: write | |
jobs: | |
autoformat: | |
name: autoformat | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out project | |
uses: actions/checkout@v4 | |
- name: terraform format (recursive) | |
uses: dflook/terraform-fmt@v1 | |
- name: Check for formatting changes | |
id: check_formatting_changes | |
run: | | |
if [[ -n $(git status --porcelain) ]]; then | |
echo "changes=true" >> "$GITHUB_OUTPUT"; | |
fi | |
- name: Commit and push formatting changes | |
if: steps.check_formatting_changes.outputs.changes == 'true' | |
run: | | |
git config user.name "Github on behalf of Wellcome Collection" | |
git config user.email "wellcomedigitalplatform@wellcome.ac.uk" | |
git commit -am "Apply auto-formatting rules" | |
git push | |