Skip to content

Commit

Permalink
fix TAGS
Browse files Browse the repository at this point in the history
  • Loading branch information
gilesknap committed Mar 6, 2024
1 parent d7a7d42 commit c3f5793
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,14 @@ jobs:
fail-fast: true
max-parallel: 1 # take advantage of caching
matrix:
target: [build, bsp]
target: [developer, runtime]
include:
- os: ubuntu-latest
platforms: linux/amd64
name: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-${{ matrix.target }}

runs-on: ${{ matrix.os }}
env:
TAGS: ${{ matrix.name }}:${{ github.ref_name }},${{ matrix.name }}:latest
TAG: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-${{ matrix.target }}
steps:

- name: Log in to GitHub Docker Registry
Expand All @@ -40,7 +39,7 @@ jobs:
uses: docker/build-push-action@v5
with:
target: ${{ matrix.target }}
tags: ${{ env.TAGS }}
tags: ${{ env.TAG }}:${{ github.ref_name }},${{ env.TAG }}:latest
cache-from: type=gha
cache-to: type=gha,mode=max
load: true
Expand All @@ -52,6 +51,5 @@ jobs:
if: ${{ github.event_name == 'push' && github.ref_type == 'tag' }}
uses: docker/build-push-action@v5
with:
target: ${{ matrix.target }}
tags: ${{ env.TAGS }}
tags: ${{ env.TAG }}:${{ github.ref_name }},${{ env.TAG }}:latest
push: true
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ENV RTEMS_BASE=/rtems6-${RTEMS_BSP}-legacy
ENV RTEMS_PREFIX=${RTEMS_BASE}/rtems/${RTEMS_VERSION}
ENV PATH=${RTEMS_PREFIX}/bin:${PATH}

FROM environment AS build
FROM environment AS developer

# build tools for x86 including python and busybox (for unzip and others)
# https://docs.rtems.org/branches/master/user/start/preparation.html#host-computer
Expand Down Expand Up @@ -76,7 +76,7 @@ RUN git submodule init && \
./waf && \
./waf install

from environment AS bsp_prep
from environment AS runtime_prep

# To make this container target smaller we take just the BSP
COPY --from=developer ${RTEMS_PREFIX} ${RTEMS_PREFIX}
Expand All @@ -88,7 +88,7 @@ RUN rm -r \
${RTEMS_PREFIX}/share/info \
${RTEMS_PREFIX}/powerpc-rtems6/lib/ldscripts

from runtime_prep AS bsp
from runtime_prep AS runtime

COPY --from=runtime_prep ${RTEMS_PREFIX} ${RTEMS_PREFIX}

0 comments on commit c3f5793

Please sign in to comment.