Skip to content

Commit

Permalink
Fix update-docs for external contributions
Browse files Browse the repository at this point in the history
  • Loading branch information
koendelaat committed Mar 31, 2023
1 parent 6a1538e commit e70bf2f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/update-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,25 @@ jobs:
name: Checkout PR
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # ratchet:actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}

- if: github.event_name == 'push'
name: Checkout branch
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # ratchet:actions/checkout@v3

- name: Generate TF docs
if: github.event.pull_request.head.repo.full_name == github.repository
uses: terraform-docs/gh-actions@f6d59f89a280fa0a3febf55ef68f146784b20ba0 # ratchet:terraform-docs/gh-actions@v1.0.0
with:
find-dir: .
git-commit-message: "docs: auto update terraform docs"
git-push: true

- name: Check TF docs
if: github.event.pull_request.head.repo.full_name != github.repository
uses: terraform-docs/gh-actions@f6d59f89a280fa0a3febf55ef68f146784b20ba0 # ratchet:terraform-docs/gh-actions@v1.0.0
with:
find-dir: .
fail-on-diff: true
git-push: false

0 comments on commit e70bf2f

Please sign in to comment.