Skip to content

refactor(monitoring): remove monitoring resources when disabled (#193) #78

refactor(monitoring): remove monitoring resources when disabled (#193)

refactor(monitoring): remove monitoring resources when disabled (#193) #78

Workflow file for this run

# Copyright 2022 Greptime Team
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Release
on:
push:
tags:
- "v*.*.*"
pull_request:
tags:
- "v*.*.*"
env:
GO_VERSION: "1.21"
jobs:
docker:
name: Build and push image
runs-on: ubuntu-22.04
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.ECR_REGION }}
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to AliCloud Container Registry
uses: docker/login-action@v3
with:
registry: greptime-registry.cn-hangzhou.cr.aliyuncs.com
username: ${{ secrets.ALICLOUD_USERNAME }}
password: ${{ secrets.ALICLOUD_PASSWORD }}
- name: Login to Amazon ECR
uses: aws-actions/amazon-ecr-login@v2
- name: Configure tag
shell: bash
run: |
VERSION=${{ github.ref_name }}
echo "VERSION=${VERSION}" >> $GITHUB_ENV
- name: Build and push operator
uses: docker/build-push-action@v5
with:
file: ./docker/operator/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
greptime/greptimedb-operator:latest
greptime/greptimedb-operator:${{ env.VERSION }}
greptime-registry.cn-hangzhou.cr.aliyuncs.com/greptime/greptimedb-operator:latest
greptime-registry.cn-hangzhou.cr.aliyuncs.com/greptime/greptimedb-operator:${{ env.VERSION }}
${{ vars.ECR_REGISTRY }}/greptime/greptimedb-operator:latest
${{ vars.ECR_REGISTRY }}/greptime/greptimedb-operator:${{ env.VERSION }}
- name: Build and push initializer
uses: docker/build-push-action@v5
with:
file: ./docker/initializer/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
greptime/greptimedb-initializer:latest
greptime/greptimedb-initializer:${{ env.VERSION }}
greptime-registry.cn-hangzhou.cr.aliyuncs.com/greptime/greptimedb-initializer:latest
greptime-registry.cn-hangzhou.cr.aliyuncs.com/greptime/greptimedb-initializer:${{ env.VERSION }}
${{ vars.ECR_REGISTRY }}/greptime/greptimedb-initializer:latest
${{ vars.ECR_REGISTRY }}/greptime/greptimedb-initializer:${{ env.VERSION }}
release:
name: Release the artifacts
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Rename crd file
run: |
cp ./config/crd/resources/greptime.io_greptimedbclusters.yaml ./greptimedbclusters.yaml
cp ./config/crd/resources/greptime.io_greptimedbstandalones.yaml ./greptimedbstandalones.yaml
cp ./manifests/bundle.yaml ./bundle.yaml
cp ./manifests/crds.yaml ./crds.yaml
- name: Publish release
uses: softprops/action-gh-release@v2
with:
name: "Release ${{ github.ref_name }}"
files: |
greptimedbclusters.yaml
greptimedbstandalones.yaml
bundle.yaml
crds.yaml