Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: modify ci version and ci build action #2014

Merged
merged 1 commit into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
Loading