Skip to content

format and release: out with BK, in with GHA #1

format and release: out with BK, in with GHA

format and release: out with BK, in with GHA #1

Workflow file for this run

# 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 "[email protected]"
git commit -am "Apply auto-formatting rules"
git push