feat(map-service): move map tags to separate table #89
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 and push" | |
| on: | |
| push: | |
| branches: [ main ] | |
| env: | |
| GO_VERSION: "1.24.4" | |
| jobs: | |
| # lint: | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - uses: actions/setup-go@v4 | |
| # with: | |
| # go-version: "${{ env.GO_VERSION }}" | |
| # cache: false | |
| # - uses: actions/checkout@v4 | |
| # - name: go-lint | |
| # uses: golangci/golangci-lint-action@v3 | |
| # with: | |
| # version: latest | |
| # args: --timeout 5m0s | |
| # Detect services that need to be built via the builder | |
| detect-services: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| services: ${{ steps.detect-services.outputs.services }} | |
| steps: | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| cache: true | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: '0' | |
| # Setup Go so we can run the builder | |
| - name: detect-services | |
| id: detect-services | |
| env: | |
| GH_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| services=$(go run builder/main.go) | |
| echo "Raw services output: $services" | |
| echo "services=$services" >> $GITHUB_OUTPUT | |
| - name: print-services | |
| run: | | |
| echo "Services: ${{ steps.detect-services.outputs.services }}" | |
| docker-build-and-publish: | |
| needs: [ detect-services ] | |
| if: needs.detect-services.outputs.services != '[]' # Only run if there are services to build | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| service: ${{ fromJson(needs.detect-services.outputs.services) }} | |
| steps: | |
| - name: Import Secrets | |
| uses: hollow-cube/actions/secrets@main | |
| with: | |
| token: ${{ secrets.VAULT_TOKEN }} | |
| path: global/github | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v4 | |
| with: | |
| go-version: ${{ inputs.go-version }} | |
| - uses: ko-build/setup-ko@v0.6 | |
| env: | |
| KO_DOCKER_REPO: mworzala | |
| - name: Build image | |
| shell: bash | |
| run: | | |
| ko login docker.io --username mworzala --password ${{ env.DOCKER_PASS }} | |
| ko build ./services/${{ matrix.service }}/cmd/${{ matrix.service }} --base-import-paths --tags ${{ github.sha }} --platform linux/amd64 | |
| echo "Version: ${{ github.sha }}" >> $GITHUB_STEP_SUMMARY | |
| helm-build: | |
| needs: [ detect-services, docker-build-and-publish ] | |
| if: needs.detect-services.outputs.services != '[]' # Only run if there are services to build | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| service: ${{ fromJson(needs.detect-services.outputs.services) }} | |
| steps: | |
| - name: Helm build | |
| uses: hollow-cube/actions/helm-build@main | |
| with: | |
| vault-token: ${{ secrets.VAULT_TOKEN }} | |
| name: ${{ matrix.service }} | |
| path: "services/${{ matrix.service }}/deploy/helm-chart" | |
| helm-deploy: | |
| needs: [ detect-services, docker-build-and-publish, helm-build ] | |
| if: needs.detect-services.outputs.services != '[]' # Only run if there are services to build | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| service: ${{ fromJson(needs.detect-services.outputs.services) }} | |
| steps: | |
| - name: Helm deploy | |
| uses: hollow-cube/actions/helm-deploy@main | |
| with: | |
| vault-token: ${{ secrets.VAULT_TOKEN }} | |
| name: ${{ matrix.service }} | |
| cluster: prod-v2 | |
| values: "services/${{ matrix.service }}/deploy/helm-chart/values-prod.yaml" |