Skip to content

Workflow file for this run

name: build and push containers to GHCR.io
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
# directory: [ api, cli ]
# platform: [ linux/amd64, linux/arm64 ]
directory: [ cli ]
platform: [ linux/amd64 ]
steps:
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN }}
logout: false
- name: checkout repo
uses: actions/checkout@v4
- name: setup docker buildx
uses: docker/setup-buildx-action@v3
# with:
# buildkitd-flags: --debug
# Add support for more platforms with QEMU (optional)
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Build and push
uses: docker/build-push-action@v6
with:
context: ./${{ matrix.directory }}
push: true
tags: ghcr.io/${{ github.repository_owner }}/hamframe-${{ matrix.directory }}:latest
platforms: ${{ matrix.platform }}