Skip to content

Commit

Permalink
ci: rework logic of terraform module documentation (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
robinlieb authored Feb 23, 2024
1 parent b51f34e commit ef47ba1
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@ name: Generate terraform docs
on:
- pull_request

permissions:
contents: write
pull-requests: write

jobs:
docs:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}

Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/terraform.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Terraform

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
terraform:
name: Terraform
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Check terraform docs
uses: terraform-docs/gh-actions@v1.0.0
with:
fail-on-diff: true

0 comments on commit ef47ba1

Please sign in to comment.