Merge branch 'main' of github.com:devwithkrishna/azure-virtual-networ… #4
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: generate-terraform-docs | |
on: | |
workflow_run: | |
workflows: | |
- "create release" | |
types: | |
- completed | |
workflow_dispatch: | |
pull_request: | |
types: | |
- closed | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
jobs: | |
generate-terraform-docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: configure terraform-docs | |
run: | | |
curl -sSLo ./terraform-docs.tar.gz https://terraform-docs.io/dl/v0.18.0/terraform-docs-v0.18.0-$(uname)-amd64.tar.gz | |
tar -xzf terraform-docs.tar.gz | |
chmod +x terraform-docs | |
sudo mv terraform-docs /usr/bin/terraform-docs | |
rm -rf terraform-docs.tar.gz | |
terraform-docs -v | |
- name: generate terraform docs | |
run: | | |
terraform-docs markdown table -c .terraform-docs.yml --output-file README.md --output-mode inject . | |
- name: checks | |
run: | | |
ls -la | |
git status | |
rm README.md | |
- name: Commit and Push Changes | |
run: | | |
git config user.name 'terraform-doc-bot' | |
git config user.email '[email protected]' | |
git add . | |
git commit -m "Update documentation" | |
git push |