Skip to content

Commit

Permalink
Updated CI and reamdme configs
Browse files Browse the repository at this point in the history
  • Loading branch information
Joeri Malmberg committed Apr 18, 2023
1 parent da9bf3b commit 52b0650
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 14 deletions.
4 changes: 4 additions & 0 deletions .config/.terraform-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
formatter: "markdown"

header-from: ./.config/header.md
footer-from: ./.config/footer.md
9 changes: 9 additions & 0 deletions .config/footer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## About

We are [Blackbird Cloud](https://blackbird.cloud), Amsterdam based cloud consultancy, and cloud management service provider. We help companies build secure, cost efficient, and scale-able solutions.

Checkout our other :point_right: [terraform modules](https://registry.terraform.io/namespaces/blackbird-cloud)

## Copyright

Copyright © 2017-2023 [Blackbird Cloud](https://blackbird.cloud)
1 change: 1 addition & 0 deletions .config/header.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[![blackbird-logo](https://raw.githubusercontent.com/blackbird-cloud/terraform-module-template/main/.config/logo_simple.png)](https://blackbird.cloud)
Binary file added .config/logo_simple.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 16 additions & 14 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,33 @@
name: Format
name: Validate and Format
# on: push
on:
pull_request_target:
types: [opened, synchronize]

jobs:
format:
if: github.event.pull_request.state == 'open'
runs-on: ubuntu-latest
container: blackbird-cloud/terraform-toolkit:latest
container: blackbirdcloud/terraform-toolkit:latest
steps:
- uses: actions/checkout@v2
if: github.event.pull_request.state == 'open'
name: Privileged Checkout
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}

- name: Configure git
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"

- name: Validate and Format
if: github.event.pull_request.state == 'open'
shell: sh
env:
GITHUB_TOKEN: "${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}"
run:
- terraform init -backend=false
- terraform validate
- terraform fmt
TFENV_TERRAFORM_VERSION: latest-allowed
run: |
terraform init -backend=false
terraform validate
terraform fmt
- uses: EndBug/add-and-commit@v9
- name: Commit and push
uses: EndBug/add-and-commit@v9
with:
default_author: github_actions
19 changes: 19 additions & 0 deletions .github/workflows/readme.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Generate terraform docs
on:
- pull_request

jobs:
docs:
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"

0 comments on commit 52b0650

Please sign in to comment.