Initial commit #2
This file contains 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: | | |
PROJECTS_JSON=$(find ./golang -maxdepth 1 -mindepth 1 -type d | sed 's|^\./||' | jq -R . | jq -s .) | |
echo "::set-output name=projects::$PROJECTS_JSON" | |
run-jobs: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
project: ${{ fromJson(needs.get-projects.outputs.projects) }} | |
steps: | |
- name: Call reusable workflow | |
uses: ./.github/workflows/golang.yml | |
with: | |
project: ${{ matrix.project }} |