mirror of
https://github.com/labring/FastGPT.git
synced 2026-05-16 01:09:01 +08:00
289da0f7b0
* sandbox-sync-agent * refactor: host pro as submodule * chore: checkpoint host pro restructure * refactor workspace test layout and startup init * chore: update next turbopack setup * chore: snapshot current work before actions fix * chore: update pro submodule * chore: point pro submodule url to upstream https * fix: Dockerfile * chore: update pro submodule * ci: support private pro submodule token and skip fork jobs * fix(ci): build sdk workspace deps before code-sandbox bundle * fix(app): exclude vitest configs from production typecheck * fix(app-image): build sdk packages before next build * fix(ci): align dockerfiles with workspace sdk build flow * chore(docker): upgrade node20 docker images to node24 * fix(ci): read admin coverage output path in pro test workflow * fix(app-image): include next-i18next config and locale assets * chore: update pro submodule * chore: do not specify branch for submodule * chore: remove most ts-nocheck sign * chore: update pro submodule * chore: remove sandbox-agent-sync package * chore: do not modify "pushData" file logic * fix: health check * chore: restore dev axios proxy state * fix: test-fastgpt report workflow * fix: use valid vitest coverage action inputs
90 lines
3.3 KiB
YAML
90 lines
3.3 KiB
YAML
name: Build fastgpt-sso-service images
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
attestations: write
|
|
id-token: write
|
|
|
|
jobs:
|
|
build-fastgpt-sso-service-images:
|
|
runs-on: buildjet-2vcpu-ubuntu-2204
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 1
|
|
- name: Update submodules
|
|
env:
|
|
PRO_SUBMODULE_TOKEN: ${{ secrets.PRO_SUBMODULE_TOKEN }}
|
|
run: |
|
|
if [ -f .gitmodules ]; then
|
|
if [ -n "${PRO_SUBMODULE_TOKEN}" ]; then
|
|
git config --global url."https://x-access-token:${PRO_SUBMODULE_TOKEN}@github.com/".insteadOf "https://github.com/"
|
|
fi
|
|
git submodule update --init --recursive
|
|
fi
|
|
- name: Install Dependencies
|
|
run: |
|
|
sudo apt update && sudo apt install -y nodejs npm
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v2
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
with:
|
|
driver-opts: network=host
|
|
- name: Cache Docker layers
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: /tmp/.buildx-cache
|
|
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
|
restore-keys: |
|
|
${{ runner.os }}-buildx-
|
|
- name: Login to GitHub Container Registry
|
|
uses: docker/login-action@v2
|
|
with:
|
|
registry: ghcr.io
|
|
username: labring
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Login to Ali Hub
|
|
uses: docker/login-action@v2
|
|
with:
|
|
registry: registry.cn-hangzhou.aliyuncs.com
|
|
username: ${{ secrets.FASTGPT_ALI_IMAGE_USER }}
|
|
password: ${{ secrets.FASTGPT_ALI_IMAGE_PSW }}
|
|
- name: Set image tags
|
|
run: |
|
|
if [[ "${{ github.ref_name }}" == "main" ]]; then
|
|
echo "Git_Latest=ghcr.io/labring/fastgpt-sso-service:latest" >> $GITHUB_ENV
|
|
echo "Git_Tag=ghcr.io/labring/fastgpt-sso-service:latest" >> $GITHUB_ENV
|
|
echo "Ali_Latest=${{ secrets.FASTGPT_ALI_IMAGE_PREFIX }}/fastgpt-sso-service:latest" >> $GITHUB_ENV
|
|
echo "Ali_Tag=${{ secrets.FASTGPT_ALI_IMAGE_PREFIX }}/fastgpt-sso-service:latest" >> $GITHUB_ENV
|
|
else
|
|
echo "Git_Tag=ghcr.io/labring/fastgpt-sso-service:${{ github.ref_name }}" >> $GITHUB_ENV
|
|
echo "Git_Latest=ghcr.io/labring/fastgpt-sso-service:latest" >> $GITHUB_ENV
|
|
echo "Ali_Tag=${{ secrets.FASTGPT_ALI_IMAGE_PREFIX }}/fastgpt-sso-service:${{ github.ref_name }}" >> $GITHUB_ENV
|
|
echo "Ali_Latest=${{ secrets.FASTGPT_ALI_IMAGE_PREFIX }}/fastgpt-sso-service:latest" >> $GITHUB_ENV
|
|
fi
|
|
|
|
- name: Build and publish image
|
|
run: |
|
|
docker buildx build \
|
|
-f pro/sso/Dockerfile \
|
|
--build-arg name=sso \
|
|
--platform linux/amd64,linux/arm64 \
|
|
--label "org.opencontainers.image.source=https://github.com/labring/FastGPT" \
|
|
--label "org.opencontainers.image.description=fastgpt-sso-service image" \
|
|
--push \
|
|
--cache-from=type=local,src=/tmp/.buildx-cache \
|
|
--cache-to=type=local,dest=/tmp/.buildx-cache \
|
|
-t ${Git_Tag} \
|
|
-t ${Git_Latest} \
|
|
-t ${Ali_Tag} \
|
|
-t ${Ali_Latest} \
|
|
.
|