Skip to content

Commit

Permalink
ci: seperate the job of building dev-builder images
Browse files Browse the repository at this point in the history
  • Loading branch information
zyy17 committed Oct 11, 2023
1 parent c60b59a commit 9a31796
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 24 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/release-dev-builder-images.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
24 changes: 0 additions & 24 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 9a31796

Please sign in to comment.