diff --git a/.github/workflows/bulider_runner_packaging.yml b/.github/workflows/bulider_runner_packaging.yml deleted file mode 100644 index cbb2eec6a5..0000000000 --- a/.github/workflows/bulider_runner_packaging.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: builder runner packaging -on: - repository_dispatch: - types: - - runner-builder - -env: - VERSION: ${{ github.event.client_payload.version }} - -jobs: - build-runner: - runs-on: ${{ github.event.client_payload.os }} - environment: ${{ github.event.client_payload.environment }} - steps: - - name: Pull code and Build the Docker image - env: - DOCKER_USERNAME: ${{ vars.DOCKER_USERNAME }} - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - run: | - git clone -b ${{ github.event.client_payload.branch }} ${{ github.event.client_payload.clone_url }}/runner.git - cd runner - chmod +x ./release.sh - ./release.sh - - build-builder: - runs-on: ${{ github.event.client_payload.os }} - environment: ${{ github.event.client_payload.environment }} - steps: - - name: Pull code and Build the Docker image - env: - DOCKER_USERNAME: ${{ vars.DOCKER_USERNAME }} - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - run: | - git clone -b ${{ github.event.client_payload.branch }} ${{ github.event.client_payload.clone_url }}/builder.git - cd builder - chmod +x ./release.sh - ./release.sh - - push-arch: - if: github.event.client_payload.os == 'self-hosted' - needs: [build-runner,build-builder] - runs-on: ${{ github.event.client_payload.os }} - environment: release-arch - steps: - - uses: actions/checkout@v2 - - name: push arch images - env: - RBD_VER: ${{ vars.RBD_VER }} - DOMESTIC_DOCKER_USERNAME: ${{ vars.DOMESTIC_DOCKER_USERNAME }} - DOMESTIC_DOCKER_PASSWORD: ${{ secrets.DOMESTIC_DOCKER_PASSWORD }} - PUSH_ARCH: ${{ vars.PUSH_ARCH }} - run: | - if [ $PUSH_ARCH == 'true' ];then - chmod +x .github/scripts/push-arch.sh && ./.github/scripts/push-arch.sh builder-runner - fi \ No newline at end of file diff --git a/.github/workflows/release-v6-builder-runner.yml b/.github/workflows/release-v6-builder-runner.yml new file mode 100644 index 0000000000..580238d6c2 --- /dev/null +++ b/.github/workflows/release-v6-builder-runner.yml @@ -0,0 +1,114 @@ +name: "release-v6-builder-runner" +on: + workflow_dispatch: + inputs: + branch: + description: 'branch' + required: true + default: 'master' + version: + description: 'version' + required: true + default: 'stable' + +env: + VERSION: ${{ github.event.inputs.version }} + +jobs: + builder: + runs-on: ubuntu-latest + environment: release-v6 + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + repository: goodrain/builder + ref: ${{ github.event.inputs.branch }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Login to Aliyun Container Registry + uses: docker/login-action@v3 + with: + registry: registry.cn-hangzhou.aliyuncs.com + username: ${{ secrets.DOMESTIC_DOCKER_USERNAME }} + password: ${{ secrets.DOMESTIC_DOCKER_PASSWORD }} + + - name: Set release description + run: | + buildTime=$(date +%F-%H) + git_commit=$(git log -n 1 --pretty --format=%h) + release_desc="${{ env.VERSION }}-${git_commit}-${buildTime}" + echo "release_desc=$release_desc" >> $GITHUB_ENV + + - name: Build and push + uses: docker/build-push-action@v6 + with: + platforms: linux/amd64,linux/arm64 + build-args: | + RELEASE_DESC=${{ env.release_desc }} + context: . + file: ./Dockerfile + push: true + tags: | + rainbond/builder:${{ env.VERSION }} + registry.cn-hangzhou.aliyuncs.com/goodrain/builder:${{ env.VERSION }} + + runner: + runs-on: ubuntu-latest + environment: release-v6 + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + repository: goodrain/runner + ref: ${{ github.event.inputs.branch }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Login to Aliyun Container Registry + uses: docker/login-action@v3 + with: + registry: registry.cn-hangzhou.aliyuncs.com + username: ${{ secrets.DOMESTIC_DOCKER_USERNAME }} + password: ${{ secrets.DOMESTIC_DOCKER_PASSWORD }} + + - name: Set release description + run: | + buildTime=$(date +%F-%H) + git_commit=$(git log -n 1 --pretty --format=%h) + release_desc="${{ env.VERSION }}-${git_commit}-${buildTime}" + echo "release_desc=$release_desc" >> $GITHUB_ENV + + - name: Build and push + uses: docker/build-push-action@v6 + with: + platforms: linux/amd64,linux/arm64 + build-args: | + RELEASE_DESC=${{ env.release_desc }} + context: . + file: ./Dockerfile + push: true + tags: | + rainbond/runner:${{ env.VERSION }} + registry.cn-hangzhou.aliyuncs.com/goodrain/runner:${{ env.VERSION }} \ No newline at end of file diff --git a/builder/repostory.go b/builder/repostory.go index af34cc9753..aee67095a4 100644 --- a/builder/repostory.go +++ b/builder/repostory.go @@ -118,4 +118,4 @@ func GetRunnerImage(brVersion string) string { } // CIVERSION - -var CIVERSION = "v5.16.0-release" +var CIVERSION = "stable"