Skip to content

Commit

Permalink
Use builder image from registry
Browse files Browse the repository at this point in the history
  • Loading branch information
doganulus committed Feb 1, 2025
1 parent d868eac commit 8cf5c95
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/buildah-build-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ on:
description: ESMINI_VERSION
type: string
required: true
default: v2.45.1
default: latest

env:
REGISTRY: ghcr.io/bounverif
IMAGE_NAME: esmini
ESMINI_VERSION: v2.45.1
ESMINI_VERSION: latest
# CONTAINERS_ROOT: /home/runner/.local/share/containers
# TMPDIR: /home/runner/.local/share/containers/tmp

Expand Down Expand Up @@ -53,12 +53,15 @@ jobs:
# build-mount-path: ${{ env.CONTAINERS_ROOT }} # The remaining space only for container build
# - run: mkdir -p $TMPDIR

- name: Set platform tag
- name: Prepare environment variables
run: |
arch=$(podman info --format='{{.Host.Arch}}')
platform=$(podman info --format='{{.Version.OsArch}}' | sed 's/\//-/g')
echo "PODMAN_ARCH=${arch}" >> $GITHUB_ENV
echo "PLATFORM=${platform}" >> $GITHUB_ENV
if [ "${{ env.ESMINI_VERSION }}" == "latest" ]; then
echo "ESMINI_VERSION=$(curl -sL "https://api.github.com/repos/esmini/esmini/releases/latest" | jq -r '.tag_name')" >> $GITHUB_ENV
fi
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/buildah-build-runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,15 @@ jobs:
# build-mount-path: ${{ env.CONTAINERS_ROOT }} # The remaining space only for container build
# - run: mkdir -p $TMPDIR

- name: Set platform tag
- name: Prepare environment variables
run: |
arch=$(podman info --format='{{.Host.Arch}}')
platform=$(podman info --format='{{.Version.OsArch}}' | sed 's/\//-/g')
echo "PODMAN_ARCH=${arch}" >> $GITHUB_ENV
echo "PLATFORM=${platform}" >> $GITHUB_ENV
if [ "${{ env.ESMINI_VERSION }}" == "latest" ]; then
echo "ESMINI_VERSION=$(curl -sL "https://api.github.com/repos/esmini/esmini/releases/latest" | jq -r '.tag_name')" >> $GITHUB_ENV
fi
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -74,6 +77,7 @@ jobs:
layers: true
oci: true
build-args: |
ESMINI_IMAGE_NAME=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
ESMINI_VERSION=${{ env.ESMINI_VERSION }}
extra-args: |
--target esmini-runtime
Expand Down

0 comments on commit 8cf5c95

Please sign in to comment.