fix: add roll-out log to track config change history (#574) #220
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release Image | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- 'main' | |
tags: | |
- '*' | |
jobs: | |
push_image: | |
runs-on: ubuntu-latest | |
name: push_image | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Docker meta | |
uses: docker/metadata-action@v4 | |
id: meta | |
with: | |
images: | | |
matrixorigin/matrixone-operator | |
registry.cn-hangzhou.aliyuncs.com/mocloud/matrixone-operator | |
registry.cn-hangzhou.aliyuncs.com/moc-pub/matrixone-operator | |
tags: | | |
type=raw,enable=true,value=nightly-{{sha}}-{{date 'YYYY-MM-DD'}} | |
type=semver,pattern={{version}} | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@master | |
with: | |
image: tonistiigi/binfmt:latest | |
platforms: linux/amd64,linux/arm64 | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Login to Alicloud Container Registry | |
id: login_alicr | |
uses: docker/login-action@v2 | |
with: | |
registry: registry.cn-hangzhou.aliyuncs.com | |
username: ${{ secrets.ACR_USERNAME }} | |
password: ${{ secrets.ACR_TOKEN }} | |
- name: Go Build Cache for Docker | |
uses: actions/cache@v4 | |
with: | |
path: go-build-cache | |
key: ${{ runner.os }}-go-build-cache-${{ hashFiles('**/go.sum') }} | |
- name: inject go-build-cache into docker | |
uses: reproducible-containers/[email protected] | |
with: | |
cache-source: go-build-cache | |
- name: Build | |
uses: docker/build-push-action@v2 | |
with: | |
builder: ${{ steps.buildx.outputs.name }} | |
context: . | |
file: Dockerfile | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max |