Skip to content

Commit 6479ff7

Browse files
committed
refactor(ci): only run style-fmt when needed
This adds a new item to `changes` for `**.tf` changes. Now it will only run `style-fmt` if PR includes changes to `site/**`, `**.tf`, or `**.ts`.
1 parent bebfe7e commit 6479ff7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

.github/workflows/coder.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ jobs:
7070
- "**.sh"
7171
go:
7272
- "**.go"
73+
tf:
74+
- "**.tf"
7375
ts:
7476
- 'site/**'
7577
k8s:
@@ -255,6 +257,8 @@ jobs:
255257
name: "style/fmt"
256258
runs-on: ubuntu-latest
257259
timeout-minutes: 5
260+
needs: changes
261+
if: needs.changes.outputs.sh == 'true' || needs.changes.outputs.ts == 'true' || needs.changes.outputs.tf == 'true'
258262
steps:
259263
- name: Checkout
260264
uses: actions/checkout@v3

0 commit comments

Comments
 (0)