chore: complete Shangwutong connector integration

This commit is contained in:
Rogee
2026-08-04 18:00:10 +08:00
parent 4611c0201f
commit 3d7ff5a6b1
8 changed files with 215 additions and 26 deletions
+40 -7
View File
@@ -11,6 +11,7 @@ on:
env:
REGISTRY: ghcr.io
IMAGE_NAME: gochat/gochat
SHANGWUTONG_IMAGE_NAME: gochat/shangwutong
GOPROXY: https://goproxy.cn,direct
jobs:
@@ -191,8 +192,8 @@ jobs:
type=semver,pattern={{major}}.{{minor}}
type=sha
# Build and push
- name: Build and push
# Build and push main GoChat image
- name: Build and push GoChat image
id: build
uses: docker/build-push-action@v5
with:
@@ -205,14 +206,46 @@ jobs:
VERSION=${{ github.ref_name }}
COMMIT_SHA=${{ github.sha }}
BUILD_DATE=${{ github.event.head_commit.timestamp }}
cache-from: type=gha
cache-to: type=gha,mode=max
cache-from: type=gha,scope=gochat
cache-to: type=gha,mode=max,scope=gochat
# Scan Docker image with Trivy
- name: Scan Docker image
- name: Extract Shangwutong connector metadata
id: shangwutong_meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.SHANGWUTONG_IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha
- name: Build and push Shangwutong connector image
id: shangwutong_build
uses: docker/build-push-action@v5
with:
context: .
file: ./channels/shangwutong/Dockerfile
push: true
tags: ${{ steps.shangwutong_meta.outputs.tags }}
labels: ${{ steps.shangwutong_meta.outputs.labels }}
cache-from: type=gha,scope=shangwutong
cache-to: type=gha,mode=max,scope=shangwutong
# Scan Docker images with Trivy
- name: Scan GoChat image
uses: aquasecurity/trivy-action@master
with:
image-ref: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
image-ref: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@${{ steps.build.outputs.digest }}
format: 'table'
exit-code: '1'
severity: 'CRITICAL,HIGH'
- name: Scan Shangwutong connector image
uses: aquasecurity/trivy-action@master
with:
image-ref: ${{ env.REGISTRY }}/${{ env.SHANGWUTONG_IMAGE_NAME }}@${{ steps.shangwutong_build.outputs.digest }}
format: 'table'
exit-code: '1'
severity: 'CRITICAL,HIGH'