name: Validate # Lightweight validation on pushes to main. Builds single-arch (amd64), # runs the smoke test, and checks image size — without pushing anything # to Docker Hub. Tag pushes are handled by docker-publish.yml which # does the full multi-arch build-and-push. on: push: branches: - main paths-ignore: - 'CHANGELOG.md' - 'README.md' - 'DOCKER_HUB.md' - 'deploy/**' - '.gitleaks.toml' pull_request: branches: - main jobs: docs-check: # Fails if DOCKER_HUB.md is out of sync with what generate-dockerhub-md.py # would produce from README.md. Keeps the two docs from drifting. runs-on: ubuntu-latest container: image: catthehacker/ubuntu:act-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Check DOCKER_HUB.md is in sync with README.md run: | python3 scripts/generate-dockerhub-md.py --check validate-base: runs-on: ubuntu-latest container: image: catthehacker/ubuntu:act-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Force IPv4 for Docker Hub run: | echo 'precedence ::ffff:0:0/96 100' >> /etc/gai.conf - name: Set up Docker Buildx uses: docker/setup-buildx-action@v4 with: driver-opts: network=host - name: Build base image (amd64, load to local daemon) uses: docker/build-push-action@v7 with: context: . platforms: linux/amd64 push: false load: true tags: opencode-devbox:ci-base - name: Smoke test run: | bash scripts/smoke-test.sh opencode-devbox:ci-base --variant base validate-omos: runs-on: ubuntu-latest container: image: catthehacker/ubuntu:act-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Force IPv4 for Docker Hub run: | echo 'precedence ::ffff:0:0/96 100' >> /etc/gai.conf - name: Set up Docker Buildx uses: docker/setup-buildx-action@v4 with: driver-opts: network=host - name: Build omos image (amd64, load to local daemon) uses: docker/build-push-action@v7 with: context: . platforms: linux/amd64 push: false load: true build-args: | INSTALL_OMOS=true tags: opencode-devbox:ci-omos - name: Smoke test run: | bash scripts/smoke-test.sh opencode-devbox:ci-omos --variant omos