dont paralelise runtime/develper #133
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and publish image to ghcr.io/epics-containers | ||
on: | ||
push: | ||
pull_request: | ||
jobs: | ||
build: | ||
# pull requests are a duplicate of a branch push if within the same repo. | ||
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository | ||
permissions: | ||
contents: read | ||
packages: write | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
epics-target: [RTEMS-beatnik, linux-x86_64, linux-aarch64] | ||
os: [ubuntu-latest] | ||
include: | ||
- epics-target: RTEMS-beatnik | ||
epics-host: linux-x86_64 | ||
name: epics-base-rtems-beatnik | ||
base_image: ghcr.io/epics-containers/rtems-beatnik-runtime:6.1rc2 | ||
platform: linux/amd64 | ||
- epics-target: linux-x86_64 | ||
epics-host: linux-x86_64 | ||
name: epics-base | ||
base_image: ubuntu:22.04 | ||
platform: linux/amd64 | ||
- epics-target: linux-aarch64 | ||
epics-host: linux-x86_64 | ||
name: epics-base-aarch64 | ||
base_image: ubuntu:22.04 | ||
platform: linux/amd64 | ||
exclude: | ||
# only native images need a runtime target | ||
- epics-target: RTEMS-beatnik | ||
target: runtime | ||
Check failure on line 41 in .github/workflows/build.yml GitHub Actions / Build and publish image to ghcr.io/epics-containersInvalid workflow file
|
||
runs-on: ${{ matrix.os }} | ||
env: | ||
TAG: ghcr.io/${{ github.repository_owner }}/${{ matrix.name }}-${{ matrix.target }}:${{ github.ref_name }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
fetch-depth: 1 | ||
- name: Log in to GitHub Docker Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io/${{ github.repository_owner }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Build image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
platforms: ${{ matrix.platform }} | ||
target: runtime | ||
build-args: | | ||
TARGET_ARCHITECTURE=${{ matrix.epics-target }} | ||
EPICS_HOST_ARCH=${{ matrix.epics-host }} | ||
BASE_IMAGE=${{ matrix.base_image }} | ||
tags: ${{ env.TAG }} | ||
cache-from: type=gha,scope=${{ matrix.epics-target }} | ||
cache-to: type=gha,mode=max,scope=${{ matrix.epics-target }} | ||
load: true | ||
- name: Push runtime image | ||
if: ${{ github.event_name == 'push' && github.ref_type == 'tag' }} | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
platforms: ${{ matrix.platform }} | ||
target: runtime | ||
build-args: | | ||
TARGET_ARCHITECTURE=${{ matrix.epics-target }} | ||
EPICS_HOST_ARCH=${{ matrix.epics-host }} | ||
BASE_IMAGE=${{ matrix.base_image }} | ||
tags: ${{ env.TAG }} | ||
push: true | ||
- name: Push developer image | ||
if: ${{ github.event_name == 'push' && github.ref_type == 'tag' }} | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
platforms: ${{ matrix.platform }} | ||
target: developer | ||
build-args: | | ||
TARGET_ARCHITECTURE=${{ matrix.epics-target }} | ||
EPICS_HOST_ARCH=${{ matrix.epics-host }} | ||
BASE_IMAGE=${{ matrix.base_image }} | ||
tags: ${{ env.TAG }} | ||
push: true |