Update Pre-Commit dependencies #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pre-Commit update | |
run-name: "Update Pre-Commit dependencies" | |
permissions: | |
contents: write | |
pull-requests: write | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: 0 1 1 * * # 1am of every 1st day of every month | |
jobs: | |
update: | |
name: "Update Pre-Commit dependencies" | |
uses: PaloAltoNetworks/terraform-modules-swfw-ci-workflows/.github/workflows/[email protected] | |
pre-commit: | |
name: Run Pre-Commit with the udpated config | |
needs: [update] | |
if: needs.update.outputs.pr_operation == 'created' || needs.update.outputs.pr_operation == 'updated' | |
uses: PaloAltoNetworks/terraform-modules-swfw-ci-workflows/.github/workflows/[email protected] | |
with: | |
pre-commit-hooks: terraform_fmt terraform_docs terraform_tflint checkov | |
branch: pre-commit-dependencies-update | |
comment-pr: | |
name: Give comment on the PR if pre-commit failed | |
needs: [pre-commit, update] | |
if: always() && (needs.pre-commit.result == 'failure' || needs.pre-commit.result == 'success') | |
uses: PaloAltoNetworks/terraform-modules-swfw-ci-workflows/.github/workflows/[email protected] | |
with: | |
pr_number: ${{ needs.update.outputs.pr_number }} | |
job_result: ${{ needs.pre-commit.result }} |