Merge pull request #4 from bitovi/fix-air-config #19
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| release: | |
| types: [published] | |
| jobs: | |
| get-projects: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| projects: ${{ steps.list-projects.outputs.projects }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Get list of Golang project folders | |
| id: list-projects | |
| run: | | |
| set -eux | |
| PROJECTS_JSON=$(find ./golang -maxdepth 1 -mindepth 1 -type d | sed 's|^\./||' | jq -c -R . | jq -s -c .) | |
| echo "projects=$PROJECTS_JSON" >> $GITHUB_OUTPUT | |
| - name: Display JSON output | |
| run: 'echo "Projects: ${{ steps.list-projects.outputs.projects }}"' | |
| run-jobs: | |
| needs: | |
| - get-projects | |
| strategy: | |
| matrix: | |
| project: ${{ fromJson(needs.get-projects.outputs.projects) }} | |
| uses: ./.github/workflows/golang.yaml | |
| with: | |
| project: ${{ matrix.project }} | |
| secrets: inherit |