-
Notifications
You must be signed in to change notification settings - Fork 8
34 lines (29 loc) · 1.2 KB
/
pre-commit-update.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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 }}