ci: fix template expansion #5
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
| name: Build, test and publish extensions | |
| on: | |
| push: | |
| defaults: | |
| run: | |
| shell: 'bash -Eeuo pipefail -x {0}' | |
| permissions: {} | |
| jobs: | |
| # Gather extensions that have been modified | |
| change-triage: | |
| name: Check changed files | |
| runs-on: ubuntu-24.04 | |
| outputs: | |
| matrix: ${{ steps.get-matrix.outputs.matrix}} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| - name: Check for changes | |
| uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 | |
| id: filter | |
| # Remember to add new folders in the operator-changed filter if needed | |
| with: | |
| base: ${{ (github.event_name == 'schedule') && 'main' || '' }} | |
| filters: | | |
| pgvector: | |
| - 'pgvector/*' | |
| # Compute a matrix containing the list of all extensions that have been modified | |
| - name: Compute matrix | |
| id: get-matrix | |
| env: | |
| # JSON array containing the extensions that have been changed | |
| EXTENSIONS_CHANGED: ${{ steps.filter.outputs.changes }} | |
| run: | | |
| echo "{\"name\": $EXTENSIONS_CHANGED}" > matrix.json | |
| echo "matrix=$(cat matrix.json)" >> "$GITHUB_OUTPUT" | |
| Bake: | |
| name: Bake | |
| needs: change-triage | |
| permissions: | |
| packages: write | |
| contents: read | |
| id-token: write | |
| security-events: write | |
| strategy: | |
| fail-fast: false | |
| matrix: ${{ fromJSON(needs.change-triage.outputs.matrix) }} | |
| uses: ./.github/workflows/bake_targets.yml | |
| with: | |
| environment: ${{ (github.ref == 'refs/heads/main') && 'production' || 'testing'}} | |
| extension_name: ${{ matrix.name }} | |
| secrets: | |
| SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} |