⬆️ Bump github.com/hashicorp/terraform-plugin-framework #154
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: Terraform docs | |
on: | |
push: | |
branches: | |
- main | |
- update-docs | |
- dependabot/terraform/** | |
concurrency: | |
group: tf-docs-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
example-docs: | |
name: Example Docs | |
runs-on: ubuntu-22.04 | |
permissions: | |
contents: write | |
pull-requests: write | |
strategy: | |
fail-fast: false | |
matrix: | |
module: | |
- ifconfig | |
- trigger-github-workflow | |
steps: | |
- name: Check out code | |
uses: actions/[email protected] | |
- name: Update module docs | |
uses: terraform-docs/[email protected] | |
with: | |
working-dir: examples/${{ matrix.module }} | |
output-file: README.md | |
output-method: inject | |
git-push: "false" | |
- name: Fix .git owner | |
run: sudo chown runner:docker -R .git | |
- name: Compute branch name | |
id: pr-meta | |
run: | | |
branch_name="${{ github.ref_name }}" | |
branch_name=${pr_title//dependabot\/terraform\/examples\/${{ matrix.module }}\//} | |
branch_name="${branch_name}/${{ matrix.module }}" | |
echo "::set-output name=pr-title::Update ${{ matrix.module }} docs ${branch_name}" | |
echo "::set-output name=branch-name::${{ matrix.module }}" | |
- name: Create Pull Request | |
uses: peter-evans/[email protected] | |
with: | |
title: ${{ steps.pr-meta.outputs.pr-title }} | |
branch: ${{ steps.pr-meta.outputs.branch-name }} | |
commit-message: "terraform-docs: Update ${{ matrix.module }} example documentation" | |
body: Update ${{ matrix.module }} documentation, see [README.md](https://github.com/${{ github.repository }}/blob/${{ steps.pr-meta.outputs.branch-name }}/examples/${{ matrix.module }}/README.md) for the result. | |
labels: documentation |