Add Python Interpreter #143
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on: | |
| pull_request: | |
| jobs: | |
| validate-servers: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Needed for diffing | |
| - name: Install Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| cache-dependency-path: go.sum | |
| go-version-file: go.mod | |
| - name: Install Task | |
| uses: arduino/setup-task@v2 | |
| with: | |
| version: 3.x | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Get changed servers | |
| shell: bash | |
| run: | | |
| git fetch origin ${{ github.event.pull_request.base.ref }} | |
| git diff --name-only --diff-filter=AM origin/${{ github.event.pull_request.base.ref }}...HEAD | grep "^servers/" > changed-servers.txt || true | |
| - name: Build and catalog changed servers | |
| shell: bash | |
| run: | | |
| set -eo pipefail | |
| while IFS= read -r file; do | |
| dir=$(dirname "$file") | |
| name=$(basename "$dir") | |
| task validate -- --name $name | |
| task build -- --tools --pull-community $name | |
| echo "--------------------------------" | |
| task catalog -- $name | |
| echo "--------------------------------" | |
| cat catalogs/$name/catalog.yaml | |
| echo "--------------------------------" | |
| done < changed-servers.txt |