mirror of https://github.com/veops/cmdb.git
chore: fix UI docker build and makes UI/API docker build parallel execution (#563)
* try fix UI docker build * parallel execution * polish * polish * polish * update
This commit is contained in:
parent
98a4824364
commit
190f452118
|
@ -1,4 +1,4 @@
|
||||||
name: api-docker-images-build-and-release
|
name: docker-images-build-and-release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
@ -12,31 +12,25 @@ on:
|
||||||
env:
|
env:
|
||||||
# Use docker.io for Docker Hub if empty
|
# Use docker.io for Docker Hub if empty
|
||||||
REGISTRY_SERVER_ADDRESS: ghcr.io/veops
|
REGISTRY_SERVER_ADDRESS: ghcr.io/veops
|
||||||
|
TAG: ${{ github.sha }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
setup-environment:
|
setup-environment:
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: ${{ github.actor != 'dependabot[bot]' }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repo
|
- name: Checkout Repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
release-images:
|
release-api-images:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [setup-environment]
|
needs: [setup-environment]
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
packages: write
|
packages: write
|
||||||
timeout-minutes: 90
|
timeout-minutes: 90
|
||||||
env:
|
|
||||||
TAG: ${{ github.sha }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repo
|
- name: Checkout Repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- uses: actions/setup-go@v5
|
|
||||||
with:
|
|
||||||
go-version: "1.21.8"
|
|
||||||
cache: false
|
|
||||||
- name: Login to GitHub Package Registry
|
- name: Login to GitHub Package Registry
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
|
@ -55,6 +49,26 @@ jobs:
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ env.REGISTRY_SERVER_ADDRESS }}/cmdb-api:${{ env.TAG }}
|
tags: ${{ env.REGISTRY_SERVER_ADDRESS }}/cmdb-api:${{ env.TAG }}
|
||||||
|
release-ui-images:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [setup-environment]
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
timeout-minutes: 90
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repo
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Login to GitHub Package Registry
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.repository_owner }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v3
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
- name: Build and push CMDB-UI Docker image
|
- name: Build and push CMDB-UI Docker image
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# ================================= UI ================================
|
# ================================= UI ================================
|
||||||
FROM node:14.17.3-alpine AS builder
|
FROM node:16.20 AS builder
|
||||||
|
|
||||||
LABEL description="cmdb-ui"
|
LABEL description="cmdb-ui"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue