Skip to content

Commit

Permalink
use image_name instead of target_architecture
Browse files Browse the repository at this point in the history
  • Loading branch information
gilesknap committed Mar 7, 2024
1 parent 4f36248 commit 929dfae
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,18 @@ jobs:
- epics-target: RTEMS-beatnik
epics-host: linux-x86_64
image_name: rtems-beatnik
base_image: ghcr.io/epics-containers/rtems-beatnik-runtime:6.1rc2
os: ubuntu-latest
platform: linux/amd64

- epics-target: linux-x86_64
epics-host: linux-x86_64
image_name: linux
base_image: ubuntu:22.04
os: ubuntu-latest
platform: linux/amd64

- epics-target: linux-arm
epics-host: linux-arm
image_name: linux
base_image: ubuntu:22.04
os: ubuntu-latest
platform: linux/arm64

Expand Down Expand Up @@ -70,6 +67,7 @@ jobs:
build-args: |
TARGET_ARCHITECTURE=${{ matrix.epics-target }}
EPICS_HOST_ARCH=${{ matrix.epics-host }}
IMAGE_NAME=${{ matrix.image_name }}
tags: ${{ env.TAG }}
cache-from: type=gha,scope=${{ matrix.epics-target }}
cache-to: type=gha,mode=max,scope=${{ matrix.epics-target }}
Expand All @@ -90,6 +88,7 @@ jobs:
build-args: |
TARGET_ARCHITECTURE=${{ matrix.epics-target }}
EPICS_HOST_ARCH=${{ matrix.epics-host }}
IMAGE_NAME=${{ matrix.image_name }}
push: true

release:
Expand Down
11 changes: 7 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
##### build stage ##############################################################

ARG TARGET_ARCHITECTURE
ARG TARGET_ARCHITECTURE=linux-x86_64
ARG EPICS_HOST_ARCH=linux-x86_64
ARG IMAGE_NAME=linux

ARG BASE=7.0.8ec1
ARG REGISTRY=ghcr.io/epics-containers

FROM ${REGISTRY}/epics-base-${TARGET_ARCHITECTURE}-developer:${BASE} AS developer
FROM ${REGISTRY}/epics-base-${IMAGE_NAME}-developer:${BASE} AS developer

# The devcontainer mounts the project root to /epics/generic-source
# Using the same location here makes devcontainer/runtime differences transparent.
Expand Down Expand Up @@ -61,14 +64,14 @@ RUN ibek ioc extract-runtime-assets /assets ${SOURCE_FOLDER}/ibek*

##### runtime stage ############################################################

FROM ${REGISTRY}/epics-base-${TARGET_ARCHITECTURE}-runtime:${BASE} AS runtime
FROM ${REGISTRY}/epics-base-${IMAGE_NAME}-runtime:${BASE} AS runtime

# get runtime assets from the preparation stage
COPY --from=runtime_prep /assets /

# install runtime system dependencies, collected from install.sh scripts
RUN ibek support apt-install --runtime

ENV TARGET_ARCHITECTURE ${TARGET_ARCHITECTURE}
ENV TARGET_ARCHITECTURE ${IMAGE_NAME}

ENTRYPOINT ["/bin/bash", "-c", "${IOC}/start.sh"]

0 comments on commit 929dfae

Please sign in to comment.