DECREASE the limit for app sample. #140
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 all in one image | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
release: | |
types: [published] | |
env: | |
ILLA_MUI_LICENSE: ${{ secrets.ILLA_MUI_LICENSE }} | |
jobs: | |
build: | |
name: Build docker image | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set build args | |
run: | | |
if [ "${{ github.event_name }}" = "release" ]; then | |
TAG_NAME=${{ github.event.release.tag_name }} | |
echo "IMAGE_TAG=${TAG_NAME}" >> $GITHUB_ENV | |
echo "BUILD_SBE_BRANCH=main" >> $GITHUB_ENV | |
echo "BUILD_BE_BRANCH=${{ github.event.release.tag_name }}" >> $GITHUB_ENV | |
echo "BUILD_FE_BRANCH=main" >> $GITHUB_ENV | |
else | |
echo "IMAGE_TAG=${{ github.ref_name }}" >> $GITHUB_ENV | |
echo "BUILD_SBE_BRANCH=${{ github.ref_name }}" >> $GITHUB_ENV | |
echo "BUILD_BE_BRANCH=${{ github.ref_name }}" >> $GITHUB_ENV | |
echo "BUILD_FE_BRANCH=${{ github.ref_name }}" >> $GITHUB_ENV | |
fi | |
- uses: actions/checkout@v4 | |
with: | |
repository: illacloud/build-all-in-one-image | |
path: build-all-in-one-image | |
- uses: actions/checkout@v4 | |
with: | |
repository: illacloud/illa-builder | |
path: illa-builder | |
submodules: true | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18.12.1 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8.7.0 | |
- name: Build website | |
run: | | |
ls | |
cd illa-builder | |
pnpm install --frozen-lockfile | |
pnpm build-self | |
cp ./apps/builder/dist ../build-all-in-one-image/builder -r | |
cp ./apps/cloud/dist ../build-all-in-one-image/cloud -r | |
cd .. | |
- name: ls build-all-in-one | |
run: | | |
ls build-all-in-one-image | |
- name: ls cloud | |
run: | | |
ls build-all-in-one-image/cloud | |
- name: ls builder | |
run: | | |
ls build-all-in-one-image/builder | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_LOGIN }} | |
password: ${{ secrets.DOCKER_PWD }} | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
context: ./build-all-in-one-image | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: | | |
illasoft/illa-builder:${{ env.IMAGE_TAG }} | |
${{ github.event_name == 'release' && 'illasoft/illa-builder:latest' || '' }} | |
build-args: | | |
FE=${{ env.BUILD_FE_BRANCH }} | |
BE=${{ env.BUILD_BE_BRANCH }} | |
SBE=${{ env.BUILD_SBE_BRANCH }} |