Skip to content

Commit 1773d53

Browse files
committed
condition lint and fmt on offlinedocs-only
1 parent c276c6f commit 1773d53

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
ts: ${{ steps.filter.outputs.ts }}
3636
k8s: ${{ steps.filter.outputs.k8s }}
3737
ci: ${{ steps.filter.outputs.ci }}
38+
offlinedocs-only: ${{ steps.filter.outputs.offlinedocs_count == steps.filter.outputs.all_count }}
3839
offlinedocs: ${{ steps.filter.outputs.offlinedocs }}
3940
steps:
4041
- name: Checkout
@@ -102,6 +103,8 @@ jobs:
102103
echo "${{ toJSON(steps.filter )}}"
103104
104105
lint:
106+
needs: changes
107+
if: needs.changes.outputs.offlinedocs-only == 'false' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
105108
runs-on: ${{ github.repository_owner == 'coder' && 'buildjet-8vcpu-ubuntu-2204' || 'ubuntu-latest' }}
106109
steps:
107110
- name: Checkout
@@ -199,6 +202,8 @@ jobs:
199202
run: ./scripts/check_unstaged.sh
200203

201204
fmt:
205+
needs: changes
206+
if: needs.changes.outputs.offlinedocs-only == 'false' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
202207
runs-on: ${{ github.repository_owner == 'coder' && 'buildjet-8vcpu-ubuntu-2204' || 'ubuntu-latest' }}
203208
timeout-minutes: 5
204209
steps:

0 commit comments

Comments
 (0)