Skip to content

Commit

Permalink
Disable terraform-docs push when on forks and sign commit
Browse files Browse the repository at this point in the history
  • Loading branch information
d-costa committed Apr 19, 2024
1 parent d29519c commit 2c3f8a1
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
jobs:
ci:
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write

steps:
# Setup dependencies
- uses: actions/checkout@v4
Expand Down Expand Up @@ -34,5 +39,11 @@ jobs:
output-method: inject
fail-on-diff: true
args: --lockfile=false
git-push: "true" # automatically push the changes to the branch
git-push: 'false'

# Push Terraform-docs changes
- uses: stefanzweifel/git-auto-commit-action@v5
if: github.repository_owner == 'runatlantis' # skip for forks
with:
commit_message: "terraform-docs: automated action"
file_pattern: 'README.md'

0 comments on commit 2c3f8a1

Please sign in to comment.