Skip to content

fix: arch

fix: arch #17

name: Publish rhcl/llm-d-inference-sim
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
on:
push:
branches:
- main
tags: [ 'v*.*.*' ]
paths:
- '.github/workflows/publish-llm-d-inference-sim.yaml'
- 'rhcl/llm-d-inference-sim/**'
env:
# Use docker.io for Docker Hub if empty
REGISTRY: quay.io
# github.repository as <account>/<repo>
IMAGE_NAME: pbastide_rh/llm-d-inference-sim-ppc64le
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup Go 1.24.x
uses: actions/setup-go@v6
with:
go-version: '1.26.x'
- name: Build the binaries
run: |
set -ex && mkdir -p tmp/ && \
cd tmp/ && \
curl -O -L https://github.com/llm-d/llm-d-inference-sim/archive/refs/tags/v0.8.2.zip && \
unzip v0.8.2.zip && \
cd llm-d-inference-sim-0.8.2 && \
cp cmd/llm-d-inference-sim/main.go cmd/cmd.go && \
CGO_ENABLED=0 GOOS=linux GOARCH=ppc64le go build -o bin/llm-d-inference-sim-ppc64le ./cmd/cmd.go && \
CGO_ENABLED=0 GOOS=linux GOARCH=s390x go build -o bin/llm-d-inference-sim-s390x ./cmd/cmd.go
ls -al bin/
pwd
# Install the cosign tool except on PR
# https://github.com/sigstore/cosign-installer
- name: Install cosign
if: github.event_name != 'pull_request'
uses: sigstore/cosign-installer@v4.1.1
with:
cosign-release: 'v2.2.3'
- name: Install QEMU dependency for multi-arch builds
run: |
sudo apt-get update -y
sudo apt-get install -y qemu-user-static
# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: redhat-actions/podman-login@v1
with:
registry: quay.io
username: ${{ secrets.HTTPBIN_USER }}
password: ${{ secrets.HTTPBIN_TOKEN }}
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
id: build-image
uses: redhat-actions/buildah-build@v2
with:
context: .
platforms: linux/ppc64le,linux,s390x
containerfiles: |
./rhcl/llm-d-inference-sim/Containerfile
tags: latest ${{ github.sha }}
image: llm-d-inference-sim-ppc64le
layers: false
oci: true
- name: Push To quay.io
if: github.event_name != 'pull_request'
id: push-to-quay
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-image.outputs.image }}
tags: ${{ steps.build-image.outputs.tags }}
registry: quay.io/pbastide_rh
username: ${{ secrets.HTTPBIN_USER }}
password: ${{ secrets.HTTPBIN_TOKEN }}