This repository was archived by the owner on Aug 17, 2025. It is now read-only.
chore(deps): update docker/login-action digest to 184bdaa #1143
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: | |
| merge_group: | |
| name: Infra CI | |
| concurrency: | |
| group: ${{ github.ref }}-infra-ci | |
| cancel-in-progress: true | |
| jobs: | |
| docker-shard: | |
| name: Shard Docker Builds | |
| runs-on: ubuntu-latest | |
| outputs: | |
| matrix: ${{ steps.set-matrix.outputs.matrix }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # ratchet:actions/checkout@v4 | |
| - uses: cashapp/activate-hermit@12a728b03ad41eace0f9abaf98a035e7e8ea2318 # ratchet:cashapp/activate-hermit@v1.1.4 | |
| - id: set-matrix | |
| name: Shard Docker Builds | |
| uses: ./.github/actions/shard-docker-builds | |
| build-docker-images: | |
| name: Build ${{ matrix.service }} Docker Image | |
| needs: docker-shard | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| service: ${{ fromJson(needs.docker-shard.outputs.matrix) }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # ratchet:actions/checkout@v4 | |
| - uses: cashapp/activate-hermit@12a728b03ad41eace0f9abaf98a035e7e8ea2318 # ratchet:cashapp/activate-hermit@v1.1.4 | |
| - name: Build Cache | |
| uses: ./.github/actions/build-cache | |
| with: | |
| enable-pnpm: 'true' | |
| - name: Build Image and Save | |
| uses: ./.github/actions/save-docker-image | |
| with: | |
| service: ${{ matrix.service }} | |
| build-jvm-artifacts: | |
| name: Build JVM Artifacts | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # ratchet:actions/checkout@v4 | |
| - name: Init Hermit | |
| uses: cashapp/activate-hermit@12a728b03ad41eace0f9abaf98a035e7e8ea2318 # ratchet:cashapp/activate-hermit@v1.1.4 | |
| - name: Build Cache | |
| uses: ./.github/actions/build-cache | |
| with: | |
| enable-maven: 'true' | |
| - name: Build JVM Artifacts | |
| shell: bash | |
| run: | | |
| just build-jvm | |
| - name: Upload JVM Jars | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # ratchet:actions/upload-artifact@v4 | |
| with: | |
| name: infra-maven-repo | |
| path: ~/.m2/repository | |
| infrastructure-shard: | |
| name: Shard Infrastructure Tests | |
| runs-on: ubuntu-latest | |
| outputs: | |
| matrix: ${{ steps.extract-tests.outputs.matrix }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # ratchet:actions/checkout@v4 | |
| - name: Init Hermit | |
| uses: cashapp/activate-hermit@12a728b03ad41eace0f9abaf98a035e7e8ea2318 # ratchet:cashapp/activate-hermit@v1.1.4 | |
| - name: Build Cache | |
| uses: ./.github/actions/build-cache | |
| with: | |
| enable-pnpm: 'true' | |
| - name: Build Go Binaries | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| just build ftl ftl-sqlc | |
| just build-language-plugins | |
| - name: Upload Release Binaries | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # ratchet:actions/upload-artifact@v4 | |
| with: | |
| name: infra-backend-binaries | |
| path: build/release | |
| - name: Extract test cases | |
| id: extract-tests | |
| run: | | |
| set -euo pipefail | |
| # shellcheck disable=SC2046 | |
| echo "matrix={\"test\":$(jq -c -n '$ARGS.positional' --args $(git grep -l '^//go:build infrastructure' | xargs grep '^func Test' | awk '{print $2}' | cut -d'(' -f1))}" >> "$GITHUB_OUTPUT" | |
| infrastructure-run: | |
| name: Infrastructure Test | |
| #if: github.event_name != 'pull_request' || github.event.action == 'enqueued' || contains( github.event.pull_request.labels.*.name, 'run-all') | |
| needs: | |
| - infrastructure-shard | |
| - build-docker-images | |
| - build-jvm-artifacts | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: ${{fromJson(needs.infrastructure-shard.outputs.matrix)}} | |
| steps: | |
| - name: Free Disk Space (Ubuntu) | |
| uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # ratchet:jlumbroso/free-disk-space@main | |
| with: | |
| # this might remove tools that are actually needed, | |
| # if set to "true" but frees about 6 GB | |
| tool-cache: false | |
| large-packages: false # this is slow | |
| - name: Checkout code | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # ratchet:actions/checkout@v4 | |
| - name: Init Hermit | |
| uses: cashapp/activate-hermit@12a728b03ad41eace0f9abaf98a035e7e8ea2318 # ratchet:cashapp/activate-hermit@v1.1.4 | |
| - name: Load Docker Images | |
| uses: ./.github/actions/load-docker-images | |
| - name: Log in to DockerHub to avoid rate limiting | |
| env: | |
| DOCKER_HUB_PULL_TOKEN: ${{ secrets.DOCKER_HUB_PULL_TOKEN }} | |
| run: | | |
| echo "${DOCKER_HUB_PULL_TOKEN}" | docker login --username "blockossreleases" --password-stdin | |
| - name: Start Cluster | |
| run: just k8s setup-istio-cluster | |
| - name: Tag and Push Docker Images | |
| run: | | |
| for image in $(just list-docker-images); do | |
| docker tag "ftl0/ftl-${image}:latest" "localhost:5000/ftl-${image}:latest" | |
| docker push "localhost:5000/ftl-${image}:latest" | |
| done | |
| - name: Build Cache | |
| uses: ./.github/actions/build-cache | |
| - name: Download Go Modules | |
| run: go mod download | |
| - name: Download Release Binaries | |
| uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 | |
| with: | |
| name: infra-backend-binaries | |
| path: build/release | |
| - name: Download JVM Binaries | |
| uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 | |
| with: | |
| name: infra-maven-repo | |
| path: ~/.m2/repository | |
| - name: Run ${{ matrix.test }} | |
| run: | | |
| set -euo pipefail | |
| chmod +x build/release/* | |
| export USE_RELEASE_BINARIES=1 | |
| # shellcheck disable=SC2046 | |
| go test -v -race -tags infrastructure -run '^${{ matrix.test }}$' $(git grep -l '^//go:build infrastructure' | xargs grep -l '^func ${{ matrix.test }}' | xargs -I {} dirname ./{}) | |
| - name: Archive Report | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # ratchet:actions/upload-artifact@v4 | |
| if: always() # Always upload the report even on failure | |
| with: | |
| name: kube-report-${{ matrix.test }} | |
| path: /tmp/ftl-kube-report/ | |
| - name: Teardown Cluster | |
| working-directory: deployment | |
| if: always() # Always cleanup the cluster even on failure | |
| run: just teardown-cluster | |
| - name: Delete Images | |
| if: always() # We don't want to cache these images, delete them before the cache action | |
| run: just k8s delete-all-images | |
| docker-success: | |
| name: Docker Success | |
| needs: [build-docker-images] | |
| runs-on: ubuntu-latest | |
| if: ${{ always() }} | |
| steps: | |
| - name: Check docker builds result | |
| run: | | |
| if [[ "${{ needs.build-docker-images.result }}" == "failure" ]]; then | |
| echo "Docker builds failed" | |
| exit 1 | |
| else | |
| echo "Docker builds passed" | |
| fi | |
| infrastructure-success: | |
| name: Infrastructure Success | |
| needs: [infrastructure-run] | |
| runs-on: ubuntu-latest | |
| if: ${{ always() }} | |
| steps: | |
| - name: Check infrastructure tests result | |
| run: | | |
| if [[ "${{ needs.infrastructure-run.result }}" == "failure" ]]; then | |
| echo "Infrastructure tests failed" | |
| exit 1 | |
| else | |
| echo "Infrastructure tests passed" | |
| fi |