From 6479ff771c0c029d1f2fd973728e71a0afaead5f Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Wed, 28 Sep 2022 16:41:46 +0000 Subject: [PATCH] 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`. --- .github/workflows/coder.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/coder.yaml b/.github/workflows/coder.yaml index 2ee79931b1..6c0fd7d3c0 100644 --- a/.github/workflows/coder.yaml +++ b/.github/workflows/coder.yaml @@ -70,6 +70,8 @@ jobs: - "**.sh" go: - "**.go" + tf: + - "**.tf" ts: - 'site/**' k8s: @@ -255,6 +257,8 @@ jobs: name: "style/fmt" runs-on: ubuntu-latest timeout-minutes: 5 + needs: changes + if: needs.changes.outputs.sh == 'true' || needs.changes.outputs.ts == 'true' || needs.changes.outputs.tf == 'true' steps: - name: Checkout uses: actions/checkout@v3