Skip to content

Commit

Permalink
Merge pull request #3 from blackbird-cloud/bb-repo-manager-updates
Browse files Browse the repository at this point in the history
Merge pull request 3 from bb-repo-manager-updates
  • Loading branch information
blackbirdcloudrepomanager[bot] authored Sep 19, 2024
2 parents 907518c + a935193 commit f517ad3
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 21 deletions.
34 changes: 33 additions & 1 deletion .config/.terraform-docs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,36 @@
formatter: "markdown"

header-from: ./.config/header.md
footer-from: ./.config/footer.md
footer-from: ./.config/footer.md

output:
file: ./README.md
mode: replace
template: |-
{{ .Content }}
sections:
hide:
- modules

content: |-
{{ include "./.config/title.md"}}
{{ .Header }}
## Example
```hcl
{{ include "./example/main.tf" }}
```
{{ .Requirements }}
{{ .Providers }}
{{ .Resources }}
{{ .Inputs }}
{{ .Outputs }}
{{ .Footer }}
2 changes: 1 addition & 1 deletion .config/footer.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ Checkout our other :point_right: [terraform modules](https://registry.terraform.

## Copyright

Copyright © 2017-2023 [Blackbird Cloud](https://blackbird.cloud)
Copyright © 2017-2024 [Blackbird Cloud](https://blackbird.cloud)
2 changes: 2 additions & 0 deletions .config/title.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Terraform Aws Client Vpn Module
Terraform module to create an AWS Client VPN
11 changes: 6 additions & 5 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Validate and Format
# on: push

on:
pull_request_target:
types: [opened, synchronize]
workflow_dispatch:
# pull_request_target:
# types: [opened, synchronize]

jobs:
format:
Expand All @@ -11,7 +12,7 @@ jobs:
container: blackbirdcloud/terraform-toolkit:latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
Expand All @@ -30,4 +31,4 @@ jobs:
- name: Commit and push
uses: EndBug/add-and-commit@v9
with:
default_author: github_actions
default_author: github_actions
37 changes: 23 additions & 14 deletions .github/workflows/readme.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,28 @@
name: Generate terraform docs
name: Generate Readme

on:
- pull_request
push:
branches:
- main
workflow_dispatch:

jobs:
docs:
generate-readme:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}

- name: Render terraform docs and push changes back to PR
uses: terraform-docs/gh-actions@main
with:
working-dir: .
output-file: README.md
output-method: inject
git-push: "true"
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.BB_REPO_MANAGER_APP_ID }}
private-key: ${{ secrets.BB_REPO_MANAGER_SECRET }}
- uses: actions/checkout@v4
with:
token: ${{ steps.app-token.outputs.token }}
- name: Render terraform docs and push changes back to PR
uses: terraform-docs/gh-actions@main
with:
working-dir: .
config-file: .config/.terraform-docs.yml
git-push: "true"
output-method: replace

0 comments on commit f517ad3

Please sign in to comment.