Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Release images for ARM64 #1090

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/build-publish-next-multiarch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build & Publish `multiarch next image`

on:
push:
branches:
- master

jobs:
build_mutiarch_image:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
name: Checkout che-theia source code
- uses: actions/setup-node@v1
name: Configuring nodejs 12.x version
with:
node-version: '12.x'
- name: Set up Docker Buildx
uses: crazy-max/ghaction-docker-buildx@v1
with:
version: latest
- name: Login to docker.io
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
registry: docker.io
- name: Build and publish images
run: |
docker image prune -a -f
./build.sh --root-yarn-opts:--ignore-scripts --dockerfile:Dockerfile.alpine
env:
CDN_PREFIX: https://static.developers.redhat.com/che/theia_artifacts/
MONACO_CDN_PREFIX: https://cdn.jsdelivr.net/npm/
DOCKER_TARGET_PLATFORM: multiarch
1 change: 1 addition & 0 deletions .github/workflows/build-publish-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
env:
CDN_PREFIX: https://static.developers.redhat.com/che/theia_artifacts/
MONACO_CDN_PREFIX: https://cdn.jsdelivr.net/npm/
DOCKER_TARGET_PLATFORM: linux/amd64
- name: Set-up npmjs auth token
run: printf "//registry.npmjs.org/:_authToken=${{ secrets.CHE_NPM_AUTH_TOKEN }}\n" >> ~/.npmrc
- name: Publish packages to npmjs
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/happy-path-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
chectlchannel: [ 'next', 'stable' ]
env:
JOB_NAME_SUFFIX: ${{matrix.dist}} ${{matrix.chectlchannel}}
DOCKER_TARGET_PLATFORM: linux/amd64
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
linelint:
runs-on: ubuntu-20.04
name: eof-newline
env:
DOCKER_TARGET_PLATFORM: linux/amd64
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -27,6 +29,8 @@ jobs:
id: linelint
node-build:
runs-on: ubuntu-20.04
env:
DOCKER_TARGET_PLATFORM: linux/amd64
steps:
- uses: actions/checkout@v2
name: Checkout che-theia source code
Expand All @@ -45,6 +49,8 @@ jobs:
matrix:
dist: [ 'alpine', 'ubi8' ]
runs-on: ubuntu-20.04
env:
DOCKER_TARGET_PLATFORM: linux/amd64
steps:
- uses: actions/checkout@v2
name: Checkout che-theia source code
Expand Down
8 changes: 6 additions & 2 deletions dockerfiles/build.include
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,14 @@ build_image() {
done

if ! dry_run; then
cd "${DIR}" && docker build --cache-from ${IMAGE_NAME} -f ${DIR}/.Dockerfile -t ${IMAGE_NAME} ${BUILD_ARGS} ${DOCKER_BUILD_TARGET} .
if [ "$DOCKER_TARGET_PLATFORM" == "multiarch" ]; then
cd "${DIR}" && docker buildx build --push --platform linux/arm64,linux/amd64 --cache-from ${IMAGE_NAME} -f ${DIR}/.Dockerfile -t ${IMAGE_NAME} ${BUILD_ARGS} ${DOCKER_BUILD_TARGET} .
else
cd "${DIR}" && docker build --cache-from ${IMAGE_NAME} -f ${DIR}/.Dockerfile -t ${IMAGE_NAME} ${BUILD_ARGS} ${DOCKER_BUILD_TARGET} .
fi
rm ${DIR}/.Dockerfile
fi

if [ $? -eq 0 ]; then
printf "Build of ${BLUE}${IMAGE_NAME} ${GREEN}[OK]${NC}\n"
if [ ! -z "${IMAGE_ALIASES}" ]; then
Expand Down