You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
name: Terraformon:
push:
branches:
- mainpull_request:
jobs:
lint:
name: Lint, Auto Format, and Validateruns-on: ubuntu-20.04steps:
- name: Checkoutuses: actions/checkout@master
- name: Setup Terraformuses: hashicorp/setup-terraform@v1with:
terraform_version: 0.13.5cli_config_credentials_hostname: 'example.org'cli_config_credentials_token: ${{ secrets.TF_API_TOKEN }}
- name: Initid: initrun: terraform init
- name: Formatid: formatrun: terraform fmt --recursive
- name: Add and Commit Auto Format Changesuses: EndBug/add-and-commit@v7with:
author_name: '@${{ github.actor }}'message: 'Auto Format Terraform code changes.'add: '.'
- name: Validateid: validaterun: terraform validate
Problem: The initial commit with the badly formatted code triggers this Lint, Auto Format, and Validate to run. Which will format the code and commit to the branch like we want. However, this new commit fails to retrigger the Lint, Auto Format, and Validate a second time. As a result, the Require Checks in the branch protection rule gets stuck waiting for the job to re-trigger from the auto commit, but it never does. Instead you just get this
Why is the job not re-triggering on the commit from this github action???
The text was updated successfully, but these errors were encountered:
The commit created by the action is not triggering further action runs because it has been made using the default GITHUB_TOKEN, which GitHub recognizes and ignores for CI runs
If you want it to trigger CI checks, you need to set up the repo with a custom PAT, you can do that with actions/checkout. My action uses the token the repo has been set up with, so there's no need to change any add-and-commit input.
The commit created by the action is not triggering further action runs because it has been made using the default GITHUB_TOKEN, which GitHub recognizes and ignores for CI runs
If you want it to trigger CI checks, you need to set up the repo with a custom PAT, you can do that with actions/checkout. My action uses the token the repo has been set up with, so there's no need to change any add-and-commit input.
The objective of this workflow is to format the terraform source code and automatically commit these new changes to the branch.
Problem: The initial commit with the badly formatted code triggers this
Lint, Auto Format, and Validate
to run. Which will format the code and commit to the branch like we want. However, this new commit fails to retrigger theLint, Auto Format, and Validate
a second time. As a result, the Require Checks in the branch protection rule gets stuck waiting for the job to re-trigger from the auto commit, but it never does. Instead you just get thisWhy is the job not re-triggering on the commit from this github action???
The text was updated successfully, but these errors were encountered: