Skip to content

Feature/tf module for api mgmt #7

Feature/tf module for api mgmt

Feature/tf module for api mgmt #7

name: generate-terraform-docs
on:
workflow_dispatch:
pull_request:
types:
- closed
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 --recursive --output-mode inject .
- name: checks
run: |
ls -la
git status
rm README.md
- name: Commit and Push Changes
run: |
git config user.name 'github-actions'
git config user.email 'actions@github.com'
git add .
git commit -m "Update documentation"
git push