Add AGENTS.md #10
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
| # Build and push the clickd container image to ECR (infra/clickd) — the | |
| # image the Tanka deployment in closeio-infrastructure pins by tag. | |
| # | |
| # - push to main → infra/clickd:sha-<short-sha> + latest (per-commit image) | |
| # - tag v* → infra/clickd:vX.Y.Z (the tag rollouts pin) | |
| # | |
| # Multi-arch (amd64 + arm64): the mgmt clusters have Graviton nodes. The | |
| # Dockerfile cross-compiles in a native build stage, so no emulated Go. | |
| # Runs on the ARC runners, which carry ECR push permissions ambiently — | |
| # same credential model as closeio-infrastructure's workflows. | |
| name: image | |
| # No paths filter on purpose: paths combine with tags as AND, which can | |
| # silently skip tag builds — and a tag push must always produce its image. | |
| on: | |
| push: | |
| branches: [main] | |
| tags: | |
| - "v*" | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: image-${{ github.ref_name || github.run_id }} | |
| cancel-in-progress: true | |
| env: | |
| ECR_IMAGE: 372094135098.dkr.ecr.us-west-2.amazonaws.com/infra/clickd | |
| jobs: | |
| build-and-push: | |
| runs-on: arc-amd64-runners | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Setup AWS creds | |
| uses: aws-actions/configure-aws-credentials@v6 | |
| with: | |
| aws-region: us-west-2 | |
| - name: Login to AWS ECR | |
| uses: aws-actions/amazon-ecr-login@v2 | |
| with: | |
| mask-password: true | |
| - uses: docker/setup-qemu-action@v4 | |
| - uses: docker/setup-buildx-action@v4 | |
| - name: Compute tags | |
| id: tags | |
| run: | | |
| if [ "${{ github.ref_type }}" = "tag" ]; then | |
| echo "tags=$ECR_IMAGE:$GITHUB_REF_NAME" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "tags=$ECR_IMAGE:sha-$(echo "$GITHUB_SHA" | cut -c1-12),$ECR_IMAGE:latest" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Build and push | |
| uses: docker/build-push-action@v7 | |
| with: | |
| context: . | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| tags: ${{ steps.tags.outputs.tags }} | |
| # Keep the index to exactly the two platform manifests: buildx | |
| # attestations add unknown/unknown entries that older containerd | |
| # versions refuse with "no match for platform in manifest". | |
| provenance: false | |
| sbom: false |