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 c0787a4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
14 changes: 13 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,12 @@ jobs:
output-method: inject
fail-on-diff: true
args: --lockfile=false
git-push: "true" # automatically push the changes to the branch
git-push: 'false'
fail-on-diff: github.repository_owner != 'runatlantis' # Fail on diff for forks

# 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'
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ You can check the status of the certificate in the Google Cloud Console.
| <a name="input_iap_backend_security_policy"></a> [iap\_backend\_security\_policy](#input\_iap\_backend\_security\_policy) | Name of the security policy to apply to the IAP backend service | `string` | `null` | no |
| <a name="input_image"></a> [image](#input\_image) | Docker image. This is most often a reference to a container located in a container registry | `string` | `"ghcr.io/runatlantis/atlantis:latest"` | no |
| <a name="input_labels"></a> [labels](#input\_labels) | Key-value pairs representing labels attaching to instance & instance template | `map(any)` | `{}` | no |
| <a name="input_machine_image"></a> [machine\_image](#input\_machine\_image) | The machine image to create VMs with, if not specified, latest cos\_cloud/cos\_stable is used | `string` | `null` | no |
| <a name="input_machine_image"></a> [machine\_image](#input\_machine\_image) | The machine image to create VMs with, if not specified, latest cos\_cloud/cos\_stable is used. To pin to one, use the following format: projects/cos-cloud/global/images/cos-stable-109-17800-147-54 | `string` | `null` | no |
| <a name="input_machine_type"></a> [machine\_type](#input\_machine\_type) | The machine type to run Atlantis on | `string` | `"n2-standard-2"` | no |
| <a name="input_name"></a> [name](#input\_name) | Custom name that's used during resource creation | `string` | n/a | yes |
| <a name="input_network"></a> [network](#input\_network) | Name of the network | `string` | n/a | yes |
Expand Down

0 comments on commit c0787a4

Please sign in to comment.