Skip to content

Commit

Permalink
Merge pull request #2014 from zzzhangqi/V6.0
Browse files Browse the repository at this point in the history
fix: modify ci version and ci build action
  • Loading branch information
zzzhangqi authored Nov 14, 2024
2 parents 36081c3 + 2c2cfb2 commit ee20769
Show file tree
Hide file tree
Showing 3 changed files with 115 additions and 56 deletions.
55 changes: 0 additions & 55 deletions .github/workflows/bulider_runner_packaging.yml

This file was deleted.

114 changes: 114 additions & 0 deletions .github/workflows/release-v6-builder-runner.yml
Original file line number Diff line number Diff line change
@@ -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 }}
2 changes: 1 addition & 1 deletion builder/repostory.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,4 @@ func GetRunnerImage(brVersion string) string {
}

// CIVERSION -
var CIVERSION = "v5.16.0-release"
var CIVERSION = "stable"

0 comments on commit ee20769

Please sign in to comment.