Simplify warm server pool capacity #41
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: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| jobs: | |
| action: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 | |
| with: | |
| node-version: "24" | |
| cache: npm | |
| - run: npm ci | |
| - name: Audit Node dependencies | |
| run: npm audit --audit-level=high | |
| - run: npm run check | |
| - name: Verify committed Action bundle | |
| run: git diff --exit-code -- dist | |
| - name: Check shell scripts | |
| run: shellcheck scripts/*.sh test/scripts/*.sh | |
| - name: Verify reproducible image artifact | |
| run: | | |
| scripts/package-runner-image.sh | |
| first="$(sha256sum build/runner-image.zip | awk '{print $1}')" | |
| scripts/package-runner-image.sh | |
| second="$(sha256sum build/runner-image.zip | awk '{print $1}')" | |
| test "${first}" = "${second}" | |
| runner-image: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 | |
| - uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3 | |
| with: | |
| platforms: arm64 | |
| - uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3 | |
| - name: Build ARM64 runner image | |
| uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6 | |
| with: | |
| context: runner-image | |
| platforms: linux/arm64 | |
| tags: lambda-microvm-github-runner:test | |
| load: true | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Scan runner image | |
| uses: anchore/scan-action@e1165082ffb1fe366ebaf02d8526e7c4989ea9d2 # v7.4.0 | |
| with: | |
| image: lambda-microvm-github-runner:test | |
| fail-build: true | |
| severity-cutoff: critical | |
| only-fixed: true | |
| output-format: table | |
| - name: Verify immutable image contents | |
| run: | | |
| docker run --rm --platform linux/arm64 \ | |
| lambda-microvm-github-runner:test sh -lc ' | |
| set -e | |
| ! ldd /opt/actions-runner/bin/Runner.Listener | grep "not found" | |
| test ! -S /var/run/docker.sock | |
| /opt/actions-runner/bin/Runner.Listener --version | |
| docker buildx version | |
| docker compose version | |
| aws --version | |
| aws lambda-microvms help >/dev/null | |
| ' |