docs: sync documentation with recent feature changes #28
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: Build and Push Container Image | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| env: | |
| REGISTRY: ghcr.io | |
| IMAGE_NAME: bjohns/tinycode-container | |
| jobs: | |
| build-push: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Login to Quay.io | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: quay.io | |
| username: ${{ secrets.QUAY_USERNAME }} | |
| password: ${{ secrets.QUAY_PASSWORD }} | |
| - name: Build and push multi-arch image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: ContainerFile | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| tags: | | |
| ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }} | |
| ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest | |
| quay.io/${{ env.IMAGE_NAME }}:${{ github.sha }} | |
| quay.io/${{ env.IMAGE_NAME }}:latest | |
| secrets: | | |
| # Classic PAT with repo scope — needed for private repo clones. Revert to GITHUB_TOKEN when repos go public. | |
| github_token=${{ secrets.GH_PAT }} | |
| - name: Smoke test (amd64) | |
| run: | | |
| docker run --rm --platform linux/amd64 --entrypoint tinycode \ | |
| ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }} --version | |
| - name: Smoke test (arm64) | |
| run: | | |
| docker run --rm --platform linux/arm64 --entrypoint tinycode \ | |
| ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }} --version |