Skip to content

Update publish-client.yml #35

Update publish-client.yml

Update publish-client.yml #35

Workflow file for this run

---
# Automatically build and publish the client to the container registry.
# This workflow is triggered on changes to the client directory.
name: Build and Publish hmi-client
# yamllint disable-line rule:truthy
on:
push:
#paths: [ 'packages/client/**' ]
branches: [ 'main', 'use-mac-os-to-build-arm-images' ]
tags: [ '*' ]
env:
IMAGE_NAME: ghcr.io/darpa-askem/hmi-client
jobs:
image-tag:
name: Create image tag
uses: ./.github/workflows/image-tag.yml
amd64:
if: false
runs-on: ubuntu-22.04
needs: image-tag
permissions:
contents: read
packages: write
steps:
- name: Login to registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Node 20.10.0 LTS
uses: actions/setup-node@v4
with:
node-version: 20.10.0
- name: Checkout the repository
uses: actions/checkout@v4
- name: Build image using Makefile
run: make image-hmi-client
- name: Build and push
uses: docker/build-push-action@v5
with:
context: packages/client/hmi-client/docker
platforms: linux/amd64
push: true
tags: $IMAGE_NAME:${{ needs.image-tag.outputs.tag }}--amd64
arm64-macos:
if: false
# Disabled until macOS GitHub runners uses M2 that can do nested virtualization
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#limitations-for-arm64-macos-runners
runs-on: macos-14
needs: image-tag
permissions:
contents: read
packages: write
steps:
- name: Setup Docker on macOS
uses: douglascamata/setup-docker-macos-action@v1-alpha
- name: Login to registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout the repository
uses: actions/checkout@v4
- name: Build image using Makefile
run: make image-hmi-client
- name: Build and push
uses: docker/build-push-action@v5
with:
context: packages/client/hmi-client/docker
platforms: linux/arm64
push: true
tags: $IMAGE_NAME:${{ needs.image-tag.outputs.tag }}--arm64
arm64-emulation:
if: false
runs-on: ubuntu-22.04
needs: image-tag
permissions:
contents: read
packages: write
steps:
- name: Login to registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Node 20.10.0 LTS
uses: actions/setup-node@v4
with:
node-version: 20.10.0
- name: Checkout the repository
uses: actions/checkout@v4
- name: Build image using Makefile
run: make image-hmi-client
- name: Build and push
uses: docker/build-push-action@v5
with:
context: packages/client/hmi-client/docker
platforms: linux/arm64
push: true
tags: $IMAGE_NAME:${{ needs.image-tag.outputs.tag }}--arm64
merge-images:
name: Merge into one manifest
needs:
- image-tag
# - amd64
# - arm64-macos
# - arm64-emulation
uses: ./.github/workflows/merge-images.yml
with:
image_name: $IMAGE_NAME
image_tag: ${{ needs.image-tag.outputs.tag }}
#secrets: inherit