diff --git a/.github/workflows/build_docker_image.yml b/.github/workflows/build_docker_image.yml index 1e1ebb0cfc3..d6e51b6b264 100644 --- a/.github/workflows/build_docker_image.yml +++ b/.github/workflows/build_docker_image.yml @@ -156,7 +156,8 @@ jobs: QL_BRANCH=${{ github.ref_name }} SOURCE_COMMIT=${{ github.sha }} network: host - platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x,linux/386 + # 由于 linux/s390x npm 无法使用,暂时去除 + platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/386 context: . file: ./docker/Dockerfile push: true diff --git a/.github/workflows/build_s390x.yml b/.github/workflows/build_s390x.yml new file mode 100644 index 00000000000..57c7205b179 --- /dev/null +++ b/.github/workflows/build_s390x.yml @@ -0,0 +1,68 @@ +name: Build s390x image + +on: [push] + +jobs: + build-docker-images: + runs-on: ubuntu-latest + strategy: + matrix: + platform: + - linux/s390x + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v2 + with: + version: '8.3.1' + - uses: actions/setup-node@v3 + with: + cache: 'pnpm' + + - name: Setup timezone + uses: zcong1993/setup-timezone@master + with: + timezone: Asia/Shanghai + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v5 + with: + images: | + ${{ github.repository }} + ghcr.io/${{ github.repository }} + # generate Docker tags based on the following events/attributes + # nightly, master, pr-2, 1.2.3, 1.2, 1 + flavor: | + latest=false + tags: | + type=schedule,pattern=nightly + type=edge + type=ref,event=pr + type=ref,event=branch,enable=${{ github.ref != format('refs/heads/{0}', 'master') }} + type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }} + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} + + - name: Setup QEMU + uses: docker/setup-qemu-action@v3 + + - name: Setup Docker Buildx + uses: docker/setup-buildx-action@v3 + with: + buildkitd-flags: --debug + + - name: Build docker image + uses: docker/build-push-action@v5 + with: + platforms: ${{ matrix.platform }} + build-args: | + ARCH=$(uname -m) + MAINTAINER=${{ github.repository_owner }} + QL_BRANCH=${{ github.ref_name }} + SOURCE_COMMIT=${{ github.sha }} + context: . + file: ./docker/Dockerfile + push: false + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file