mirror of
https://github.com/kubesphere/kubekey.git
synced 2025-12-25 17:12:50 +00:00
* fix: build arm harbor v2.10.2 Signed-off-by: redscholar <blacktiledhouse@gmail.com> * fix: build arm harbor v2.10.2 Signed-off-by: xuesongzuo@yunify.com <xuesongzuo@yunify.com> fix: build arm harbor v2.10.2 Signed-off-by: xuesongzuo@yunify.com <xuesongzuo@yunify.com> fix: build arm harbor v2.10.2 Signed-off-by: xuesongzuo@yunify.com <xuesongzuo@yunify.com> fix: build arm harbor v2.10.2 Signed-off-by: xuesongzuo@yunify.com <xuesongzuo@yunify.com> --------- Signed-off-by: redscholar <blacktiledhouse@gmail.com> Signed-off-by: xuesongzuo@yunify.com <xuesongzuo@yunify.com> Co-authored-by: xuesongzuo@yunify.com <xuesongzuo@yunify.com>
108 lines
3.7 KiB
YAML
108 lines
3.7 KiB
YAML
---
|
|
name: GenRepositoryISO
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'iso-*'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-iso:
|
|
runs-on: ubuntu-latest
|
|
if: github.repository == 'kubesphere/kubekey'
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- name: almalinux-9.0-rpms
|
|
dockerfile: dockerfile.almalinux90
|
|
- name: debian10-debs
|
|
dockerfile: dockerfile.debian10
|
|
- name: debian11-debs
|
|
dockerfile: dockerfile.debian11
|
|
- name: debian12-debs
|
|
dockerfile: dockerfile.debian12
|
|
- name: ubuntu-18.04-debs
|
|
dockerfile: dockerfile.ubuntu1804
|
|
- name: ubuntu-20.04-debs
|
|
dockerfile: dockerfile.ubuntu2004
|
|
- name: ubuntu-22.04-debs
|
|
dockerfile: dockerfile.ubuntu2204
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Build iso image to local
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: hack/gen-repository-iso
|
|
file: hack/gen-repository-iso/${{ matrix.dockerfile }}
|
|
platforms: linux/amd64,linux/arm64
|
|
outputs: type=local,dest=./output
|
|
|
|
- name: Prepare for upload iso
|
|
shell: bash
|
|
run: |
|
|
mv ./output/linux_amd64/*.iso ${{ matrix.name }}-amd64.iso
|
|
mv ./output/linux_arm64/*.iso ${{ matrix.name }}-arm64.iso
|
|
sha256sum *.iso > ${{ matrix.name }}.iso.sha256sum.txt
|
|
|
|
- name: Wait for release workflow to finish
|
|
uses: lewagon/wait-on-check-action@v1.3.4
|
|
with:
|
|
ref: ${{ github.ref }}
|
|
check-name: 'create draft release'
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
wait-interval: 10
|
|
allowed-conclusions: success
|
|
|
|
- name: Release and upload packages
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
uses: softprops/action-gh-release@v2
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
draft: true
|
|
files: |
|
|
${{ matrix.name }}.iso.sha256sum.txt
|
|
${{ matrix.name }}-amd64.iso
|
|
${{ matrix.name }}-arm64.iso
|
|
|
|
build-harbor:
|
|
runs-on: ubuntu-latest
|
|
if: github.repository == 'kubesphere/kubekey'
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- shell: bash
|
|
name: build arm harbor
|
|
run: |
|
|
rm -rf qsctl_v2.4.3_linux_amd64.tar.gz
|
|
wget https://attack-on-titan.gd2.qingstor.com/qsctl/v2.4.3/qsctl_v2.4.3_linux_amd64.tar.gz
|
|
tar -zxvf qsctl_v2.4.3_linux_amd64.tar.gz
|
|
rm -rf qsctl_v2.4.3_linux_amd64.tar.gz
|
|
mv qsctl_v2.4.3_linux_amd64 /usr/local/bin/qsctl
|
|
echo "access_key_id: ${{secrets.KS_QSCTL_ACCESS_KEY_ID}}" > /usr/local/bin/qsctl-config.yaml
|
|
echo "secret_access_key: ${{ secrets.KS_QSCTL_SECRET_ACCESS_KEY }}" >> /usr/local/bin/qsctl-config.yaml
|
|
|
|
for d in $(ls config/harbor); do
|
|
if [ -d "config/harbor/$d" ]; then
|
|
cd "config/harbor/$d" && make build
|
|
qsctl -c /usr/local/bin/qsctl-config.yaml cp harbor-offline-installer-"$d"-linux-arm64.tgz qs://kubekey/github.com/goharbor/harbor/releases/download/"$d"/harbor-offline-installer-"$d"-linux-arm64.tgz
|
|
fi
|
|
done
|
|
|
|
- name: Create GitHub Release & Upload Assets
|
|
uses: ncipollo/release-action@v1
|
|
with:
|
|
tag_name: ${{ github.ref_name }}
|
|
name: ${{ github.ref_name }}
|
|
artifacts: config/harbor/*/*harbor-offline-installer*-linux-arm64.tgz
|
|
allowUpdates: true
|
|
replaceArtifacts: true |