Skip to content

fix: copy config directory into build context in build-local.sh #33

fix: copy config directory into build context in build-local.sh

fix: copy config directory into build context in build-local.sh #33

Workflow file for this run

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@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Set up QEMU
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
- name: Log in to GHCR
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Quay.io
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # 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@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # 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