fix: avoid build-time manager secret requirement
This commit is contained in:
@@ -25,14 +25,7 @@ jobs:
|
||||
|
||||
- name: 构建并推送镜像
|
||||
run: |
|
||||
if [ -z "${{ secrets.IM_CONFIG_API_SECRET }}${{ secrets.IM_INTERNAL_API_SECRET }}" ]; then
|
||||
echo "IM_CONFIG_API_SECRET or IM_INTERNAL_API_SECRET must be configured in Gitea secrets"
|
||||
exit 1
|
||||
fi
|
||||
docker build \
|
||||
--build-arg IM_CONFIG_API_SECRET="${{ secrets.IM_CONFIG_API_SECRET }}" \
|
||||
--build-arg IM_INTERNAL_API_SECRET="${{ secrets.IM_INTERNAL_API_SECRET }}" \
|
||||
-t git.118im.com/im_team/im-workbench:${{ steps.vars.outputs.tag }} .
|
||||
docker build -t git.118im.com/im_team/im-workbench:${{ steps.vars.outputs.tag }} .
|
||||
docker push git.118im.com/im_team/im-workbench:${{ steps.vars.outputs.tag }}
|
||||
|
||||
- name: 部署到k3s测试集群
|
||||
|
||||
+2
-4
@@ -9,15 +9,13 @@ RUN CGO_ENABLED=0 GOOS=linux go build -o /out/im_workbench ./cmd/workbench
|
||||
FROM alpine:3.22
|
||||
|
||||
WORKDIR /app
|
||||
ARG IM_CONFIG_API_SECRET=
|
||||
ARG IM_INTERNAL_API_SECRET=
|
||||
ENV IM_WORKBENCH_CONFIG=/app/configs/workbench.test.json
|
||||
ENV IM_WORKBENCH_INTERNAL_SERVICE_NAME=hotgo-admin
|
||||
ENV IM_WORKBENCH_INTERNAL_SECRET=hotgo-workbench-internal
|
||||
ENV IM_WORKBENCH_MANAGER_BASE_URL=https://admin.118im.com
|
||||
ENV IM_WORKBENCH_MANAGER_SERVICE_NAME=im-server
|
||||
ENV IM_CONFIG_API_SECRET=${IM_CONFIG_API_SECRET}
|
||||
ENV IM_INTERNAL_API_SECRET=${IM_INTERNAL_API_SECRET}
|
||||
ENV IM_CONFIG_API_SECRET=
|
||||
ENV IM_INTERNAL_API_SECRET=
|
||||
COPY --from=builder /out/im_workbench /app/im_workbench
|
||||
COPY configs /app/configs
|
||||
EXPOSE 6061
|
||||
|
||||
Reference in New Issue
Block a user