Skip to content

[CICD] Add Hygon BW1000 CI support #4

[CICD] Add Hygon BW1000 CI support

[CICD] Add Hygon BW1000 CI support #4

# Copyright 2026 FlagOS Contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Build Docker Images - Hygon
on:
workflow_dispatch:
inputs:
target:
description: Docker target stage
required: true
type: choice
options: [dev, release]
default: dev
push:
description: Push image to the configured registry
type: boolean
default: true
no_cache:
description: Build without Docker cache
type: boolean
default: false
pull_request:
branches: [main]
paths:
- 'docker/hygon/**'
- 'tools/install/hygon/**'
- 'requirements/hygon/**'
- '.github/configs/hygon.yml'
- '.github/workflows/build_image_hygon.yml'
- '.github/workflows/build_image_common.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
uses: ./.github/workflows/build_image_common.yml
with:
platform: hygon
task: train
target: ${{ inputs.target || 'dev' }}
# Fork PRs have no registry credentials. They build, finalize, and verify
# the image; publishing remains an explicit workflow_dispatch operation.
push: ${{ github.event_name == 'workflow_dispatch' && inputs.push }}
no_cache: ${{ inputs.no_cache || false }}