Skip to content

🚧 Fix goroutine panic of the rule eval #85

🚧 Fix goroutine panic of the rule eval

🚧 Fix goroutine panic of the rule eval #85

Workflow file for this run

name: CI
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Inject slug/short variables
uses: rlespinasse/github-slug-action@v4
- name: Get current date
id: date
run: echo "::set-output name=today::$(date +'%Y-%m-%d_%H-%M')"
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to Aliyun Hub
uses: docker/login-action@v3
with:
registry: registry.cn-hangzhou.aliyuncs.com
username: ${{ secrets.OPSRE_ALIHUB_USERNAME }}
password: ${{ secrets.OPSRE_ALIHUB_TOKEN }}
- name: Set env
run: |
echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV
echo "SHORT_SHA=$(echo ${GITHUB_SHA:0:4})" >> $GITHUB_ENV
echo "DATE=$(TZ=Asia/Shanghai date +%Y-%m-%d.%H-%M-%S)" >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
# 所需要的体系结构,可以在 Available platforms 步骤中获取所有的可用架构
platforms: linux/arm64,linux/amd64
# 镜像推送时间
push: ${{ github.event_name != 'pull_request' }}
build-args: |
VERSION=${{ steps.date.outputs.today }}
# 给清单打上多个标签
tags: |
cairry/watchalert:latest
cairry/watchalert:${{ steps.date.outputs.today }}
registry.cn-hangzhou.aliyuncs.com/opsre/watchalert:latest
registry.cn-hangzhou.aliyuncs.com/opsre/watchalert:${{ steps.date.outputs.today }}