Repository navigation
fix(kit): allow the LocalStack hostnames in the network policy so that sbx resolves them #12
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
| # Lints the scripts and builds every kit for both platforms. On each push to | |
| # main, it then pushes the kits to Docker Hub with the tag latest. The sandbox | |
| # tests (make smoke, make project-config, make e2e) need KVM or Apple silicon, | |
| # which GitHub-hosted runners do not have, so they run on a developer machine. | |
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| # The release workflow runs lint and build first. The publish job does not | |
| # run there, because the event is not a push. | |
| workflow_call: | |
| permissions: | |
| contents: read | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Check shell scripts | |
| run: scripts/lint.sh | |
| - name: Check workflows | |
| run: docker run --rm -v "$PWD:/repo" -w /repo rhysd/actionlint:latest -color | |
| build: | |
| name: Build kits | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| # The build pulls both agent kits for both platforms. A hosted runner | |
| # does not have enough free disk for that until these unused toolchains | |
| # are removed. | |
| - name: Free disk space | |
| run: | | |
| sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL | |
| docker system prune --all --force | |
| df -h / | |
| - uses: docker/setup-qemu-action@v4 | |
| # A kit set can list only published kits, so the mixin goes to a local | |
| # registry first. The build fails on the known ways to break a set, | |
| # such as a component with different descriptors per platform. | |
| - name: Start the local registry | |
| run: scripts/local-registry.sh | |
| - name: Build the mixin and the sets | |
| run: scripts/build.sh --registry localhost:5055 --platform linux/amd64,linux/arm64 | |
| # The docker-push environment holds the Docker Hub token. It accepts only | |
| # main. The token can push to many localstack repositories. | |
| publish: | |
| name: Publish latest kits | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| needs: [lint, build] | |
| runs-on: ubuntu-24.04 | |
| environment: | |
| name: docker-push | |
| deployment: false | |
| # A newer push waits for the running publish, so latest ends on the newest | |
| # commit. | |
| concurrency: | |
| group: publish-latest | |
| cancel-in-progress: false | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Free disk space | |
| run: | | |
| sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL | |
| docker system prune --all --force | |
| df -h / | |
| - uses: docker/setup-qemu-action@v4 | |
| - uses: docker/login-action@v4 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKER_PUSH_TOKEN }} | |
| - name: Build and push the kits as latest | |
| run: scripts/build.sh --latest |