Split build script into segments, add NODE_VERSION to workflow
This commit is contained in:
@@ -13,14 +13,12 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
max-parallel: 4
|
||||
matrix:
|
||||
DISTRIB_ID: [ubuntu]
|
||||
DISTRIB_RELEASE: [16.04, 18.04, 20.04, latest]
|
||||
PLATFORMS: [linux/amd64, linux/arm64, linux/386]
|
||||
DISTRIB_RELEASE: [latest, 20.04, 18.04, 16.04]
|
||||
IMAGE_TYPE: [nodejs]
|
||||
exclude:
|
||||
- DISTRIB_RELEASE: 20.04 # focal i386 doesn't exists (yet?)
|
||||
PLATFORMS: linux/386
|
||||
NODE_VERSION: ['12']
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up QEMU
|
||||
@@ -46,11 +44,12 @@ jobs:
|
||||
context: .
|
||||
push: ${{ github.event_name != 'pull_request' && github.event_name != 'push' }}
|
||||
file: ./linux/${{ matrix.DISTRIB_ID }}/${{ matrix.IMAGE_TYPE }}/Dockerfile
|
||||
platforms: ${{ matrix.PLATFORMS }}
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: ghcr.io/catthehacker/docker-images:${{ matrix.DISTRIB_ID }}-${{ matrix.IMAGE_TYPE }}-${{ matrix.DISTRIB_RELEASE }}
|
||||
build-args: |
|
||||
DISTRIB_ID=${{ matrix.DISTRIB_ID }}
|
||||
DISTRIB_RELEASE=${{ matrix.DISTRIB_RELEASE }}
|
||||
NODE_VERSION=${{ matrix.NODE_VERSION }}
|
||||
- name: Build and push ${{ matrix.DISTRIB_ID }}-${{ matrix.IMAGE_TYPE }}-latest image
|
||||
id: docker_build_latest
|
||||
uses: docker/build-push-action@v2
|
||||
@@ -59,8 +58,9 @@ jobs:
|
||||
context: .
|
||||
push: ${{ github.event_name != 'pull_request' && github.event_name != 'push' }}
|
||||
file: ./linux/${{ matrix.DISTRIB_ID }}/${{ matrix.IMAGE_TYPE }}/Dockerfile
|
||||
platforms: ${{ matrix.PLATFORMS }}
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: ghcr.io/catthehacker/docker-images:${{ matrix.DISTRIB_ID }}-${{ matrix.IMAGE_TYPE }}-latest
|
||||
build-args: |
|
||||
DISTRIB_ID=${{ matrix.DISTRIB_ID }}
|
||||
DISTRIB_RELEASE=${{ steps.ubuntu_latest.outputs.UBUNTU_LATEST }}
|
||||
NODE_VERSION=${{ matrix.NODE_VERSION }}
|
||||
|
||||
Reference in New Issue
Block a user