Skip to content
This repository was archived by the owner on Mar 30, 2026. It is now read-only.

Commit 9aeb1cc

Browse files
authored
chore: Use changed files action instead of path filters (#21)
1 parent 010b0c7 commit 9aeb1cc

1 file changed

Lines changed: 17 additions & 10 deletions

File tree

.github/workflows/terraform.yml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,8 @@ name: "Terraform Module Validation"
33
on:
44
push:
55
branches: ["main"]
6-
paths:
7-
- "**/README.md"
8-
- "**/**.tf"
9-
- "**/**.tpl"
10-
- ".github/workflows/**"
116
pull_request:
127
branches: ["main"]
13-
paths:
14-
- "**/README.md"
15-
- "**/**.tf"
16-
- "**/**.tpl"
17-
- ".github/workflows/**"
188

199
permissions:
2010
contents: write
@@ -26,9 +16,26 @@ concurrency:
2616
cancel-in-progress: true
2717

2818
jobs:
19+
prepare:
20+
runs-on: ubuntu-latest
21+
outputs:
22+
files-changed: ${{ steps.changed-files.outputs.any_changed }}
23+
steps:
24+
- uses: actions/checkout@v4
25+
- name: Check if files changed
26+
id: changed-files
27+
uses: tj-actions/changed-files@v45
28+
with:
29+
files: |
30+
README.md
31+
**/*.tf
32+
**/*.tpl
33+
.github/workflows/**
2934
discover:
3035
name: "Discover Modules and Examples"
3136
runs-on: ubuntu-latest
37+
needs: prepare
38+
if: needs.prepare.outputs.files-changed == 'true'
3239
outputs:
3340
modules: ${{ steps.set-modules.outputs.modules }}
3441
examples: ${{ steps.set-examples.outputs.examples }}

0 commit comments

Comments
 (0)