From 9a31796b0b6e7491bfd96339955c082b41186955 Mon Sep 17 00:00:00 2001 From: zyy17 Date: Wed, 11 Oct 2023 10:59:45 +0800 Subject: [PATCH] ci: seperate the job of building dev-builder images --- .../workflows/release-dev-builder-images.yaml | 30 +++++++++++++++++++ .github/workflows/release.yml | 24 --------------- 2 files changed, 30 insertions(+), 24 deletions(-) create mode 100644 .github/workflows/release-dev-builder-images.yaml diff --git a/.github/workflows/release-dev-builder-images.yaml b/.github/workflows/release-dev-builder-images.yaml new file mode 100644 index 000000000000..20b3d376bcf2 --- /dev/null +++ b/.github/workflows/release-dev-builder-images.yaml @@ -0,0 +1,30 @@ +name: Release dev-builder images + +on: + workflow_dispatch: # Allows you to run this workflow manually. + inputs: + release_dev_builder_images: + type: boolean + description: Release dev-builder images + required: false + default: false + +jobs: + release-dev-builder-images: + name: Release dev builder images + if: ${{ inputs.release_dev_builder_images }} # Only manually trigger this job. + runs-on: ubuntu-latest-16-cores + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Build and push dev builder images + uses: ./.github/actions/build-dev-builder-image + with: + dockerhub-image-registry-username: ${{ secrets.DOCKERHUB_USERNAME }} + dockerhub-image-registry-token: ${{ secrets.DOCKERHUB_TOKEN }} + acr-image-registry: ${{ vars.ACR_IMAGE_REGISTRY }} + acr-image-registry-username: ${{ secrets.ALICLOUD_USERNAME }} + acr-image-registry-password: ${{ secrets.ALICLOUD_PASSWORD }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c56bf055a134..d8e01cade05f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -73,11 +73,6 @@ on: description: Build and push images to DockerHub and ACR required: false default: false - release_dev_builder_image: - type: boolean - description: Release dev-builder image - required: false - default: false # Use env variables to control all the release process. env: @@ -325,25 +320,6 @@ jobs: with: version: ${{ needs.allocate-runners.outputs.version }} - release-dev-builder-image: - name: Release dev builder image - if: ${{ inputs.release_dev_builder_image }} # Only manually trigger this job. - runs-on: ubuntu-latest-16-cores - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Build and push dev builder image - uses: ./.github/actions/build-dev-builder-image - with: - dockerhub-image-registry-username: ${{ secrets.DOCKERHUB_USERNAME }} - dockerhub-image-registry-token: ${{ secrets.DOCKERHUB_TOKEN }} - acr-image-registry: ${{ vars.ACR_IMAGE_REGISTRY }} - acr-image-registry-username: ${{ secrets.ALICLOUD_USERNAME }} - acr-image-registry-password: ${{ secrets.ALICLOUD_PASSWORD }} - ### Stop runners ### # It's very necessary to split the job of releasing runners into 'stop-linux-amd64-runner' and 'stop-linux-arm64-runner'. # Because we can terminate the specified EC2 instance immediately after the job is finished without uncessary waiting.