Skip to content

release-v6-standalone #50

release-v6-standalone

release-v6-standalone #50

name: "release-v6-standalone"
on:
workflow_dispatch:
inputs:
branch:
description: 'branch'
required: true
default: 'main'
version:
description: 'version'
required: true
default: 'v6.0-dev'
platforms:
description: 'platforms'
required: true
default: 'linux/amd64'
type: choice
options:
- linux/amd64
- linux/amd64,linux/arm64
env:
VERSION: ${{ github.event.inputs.version }}
jobs:
standalone:
runs-on: ubuntu-latest
environment: release-v6
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
repository: goodrain/rainbond-console
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: Pull Amd64 Docker image
run: |
ARCH=amd64 VERSION=${{ env.VERSION }} sh standalone/images-package.sh
- name: Pull Arm64 Docker image
run: |
if [[ "${{ github.event.inputs.platforms }}" == "linux/amd64,linux/arm64" ]]; then
ARCH=arm64 VERSION=${{ env.VERSION }} sh standalone/images-package.sh
fi
- 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: Build and push
uses: docker/build-push-action@v6
with:
platforms: ${{ github.event.inputs.platforms }}
build-args: |
VERSION=${{ env.VERSION }}
context: .
file: standalone/Dockerfile
push: true
tags: |
rainbond/rainbond:${{ env.VERSION }}-k3s
registry.cn-hangzhou.aliyuncs.com/goodrain/rainbond:${{ env.VERSION }}-k3s