Compare commits

...

2 Commits

Author SHA1 Message Date
Junyan Qin
f25ac78538 ci: no longer build for linux/arm64 2025-11-11 19:03:29 +08:00
Junyan Qin
cef24d8c4b fix: linter errors 2025-11-11 18:24:06 +08:00
2 changed files with 12 additions and 88 deletions

View File

@@ -3,15 +3,12 @@ on:
## 发布release的时候会自动构建
release:
types: [published]
workflow_dispatch:
jobs:
prepare:
publish-docker-image:
runs-on: ubuntu-latest
name: Prepare build metadata
permissions:
contents: read
outputs:
version: ${{ steps.check_version.outputs.version }}
is_prerelease: ${{ github.event.release.prerelease }}
name: Build image
steps:
- name: Checkout
uses: actions/checkout@v2
@@ -39,81 +36,13 @@ jobs:
echo $GITHUB_REF
echo ::set-output name=version::${GITHUB_REF}
fi
build-images:
runs-on: ubuntu-latest
needs: prepare
name: Build ${{ matrix.platform }} image
permissions:
contents: read
strategy:
matrix:
platform: [linux/amd64, linux/arm64]
steps:
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false
- name: Set platform tag
id: platform_tag
run: |
# Convert platform to tag suffix (e.g., linux/amd64 -> amd64)
PLATFORM_TAG=$(echo ${{ matrix.platform }} | sed 's/linux\///g')
echo ::set-output name=tag::${PLATFORM_TAG}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Registry
run: docker login --username=${{ secrets.DOCKER_USERNAME }} --password ${{ secrets.DOCKER_PASSWORD }}
- name: Build and cache
run: |
docker buildx build \
--platform ${{ matrix.platform }} \
--cache-to type=registry,ref=rockchin/langbot:cache-${{ steps.platform_tag.outputs.tag }},mode=max \
--cache-from type=registry,ref=rockchin/langbot:cache-${{ steps.platform_tag.outputs.tag }} \
-t rockchin/langbot:${{ needs.prepare.outputs.version }} \
.
push-multiarch:
runs-on: ubuntu-latest
needs: [prepare, build-images]
name: Build and push multi-arch images
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Registry
run: docker login --username=${{ secrets.DOCKER_USERNAME }} --password ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push for Release
if: ${{ needs.prepare.outputs.is_prerelease == 'false' }}
run: |
docker buildx build \
--platform linux/amd64,linux/arm64 \
--cache-from type=registry,ref=rockchin/langbot:cache-amd64 \
--cache-from type=registry,ref=rockchin/langbot:cache-arm64 \
-t rockchin/langbot:${{ needs.prepare.outputs.version }} \
-t rockchin/langbot:latest \
--push \
.
- name: Build and push for Pre-release
if: ${{ needs.prepare.outputs.is_prerelease == 'true' }}
run: |
docker buildx build \
--platform linux/amd64,linux/arm64 \
--cache-from type=registry,ref=rockchin/langbot:cache-amd64 \
--cache-from type=registry,ref=rockchin/langbot:cache-arm64 \
-t rockchin/langbot:${{ needs.prepare.outputs.version }} \
--push \
.
- name: Create Buildx
run: docker buildx create --name mybuilder --use
- name: Build for Release # only relase, exlude pre-release
if: ${{ github.event.release.prerelease == false }}
run: docker buildx build --platform linux/amd64 -t rockchin/langbot:${{ steps.check_version.outputs.version }} -t rockchin/langbot:latest . --push
- name: Build for Pre-release # no update for latest tag
if: ${{ github.event.release.prerelease == true }}
run: docker buildx build --platform linux/amd64 -t rockchin/langbot:${{ steps.check_version.outputs.version }} . --push

View File

@@ -22,9 +22,6 @@ export default function PluginConfigPage() {
const [isEditForm, setIsEditForm] = useState(false);
const [pipelineList, setPipelineList] = useState<PipelineCardVO[]>([]);
const [selectedPipelineId, setSelectedPipelineId] = useState('');
const [selectedPipelineIsDefault, setSelectedPipelineIsDefault] =
useState(false);
const [sortByValue, setSortByValue] = useState<string>('created_at');
const [sortOrderValue, setSortOrderValue] = useState<string>('DESC');
@@ -92,8 +89,6 @@ export default function PluginConfigPage() {
const handleCreateNew = () => {
setIsEditForm(false);
setSelectedPipelineId('');
setSelectedPipelineIsDefault(false);
setDialogOpen(true);
};