File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed
Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change 1+ on :
2+ pull_request :
3+
4+ jobs :
5+ validate-servers :
6+ runs-on : ubuntu-latest
7+ steps :
8+ - uses : actions/checkout@v4
9+ with :
10+ fetch-depth : 0 # Needed for diffing
11+
12+ - name : Install Go
13+ uses : actions/setup-go@v5
14+ with :
15+ cache-dependency-path : go.sum
16+ go-version-file : go.mod
17+
18+ - name : Install Task
19+ uses : arduino/setup-task@v2
20+ with :
21+ version : 3.x
22+ repo-token : ${{ secrets.GITHUB_TOKEN }}
23+
24+ - name : Get changed servers
25+ shell : bash
26+ run : |
27+ git fetch origin ${{ github.event.pull_request.base.ref }}
28+ git diff --name-only --diff-filter=AM origin/${{ github.event.pull_request.base.ref }} HEAD | grep "^servers/" > changed-servers.txt || true
29+
30+ - name : Build and catalog changed servers
31+ shell : bash
32+ run : |
33+ set -eo pipefail
34+ while IFS= read -r file; do
35+ dir=$(dirname "$file")
36+ name=$(basename "$dir")
37+ task build -- --tools $name
38+ echo "--------------------------------"
39+ task catalog -- $name
40+ echo "--------------------------------"
41+ cat catalogs/$name/catalog.yaml
42+ echo "--------------------------------"
43+ done < changed-servers.txt
You can’t perform that action at this time.
0 commit comments