Skip to content

chore: dump 2.2.1-rc.3 version #82

chore: dump 2.2.1-rc.3 version

chore: dump 2.2.1-rc.3 version #82

Workflow file for this run

name: Release EMQX Operator
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
on:
push:
tags:
- "*"
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check helm
run: |
version=$(grep -E "^version" deploy/charts/emqx-operator/Chart.yaml | grep -oE "[0-9]+\.[0-9]+\.[0-9]+(-(alpha|beta|rc)\.[0-9])?")
if [ "$version" != "${GITHUB_REF##*/}" ]; then
echo "Need update version for Chart.yaml"
exit 1
fi
appVersion=$(grep -E "^appVersion" deploy/charts/emqx-operator/Chart.yaml | grep -oE "[0-9]+\.[0-9]+\.[0-9]+(-(alpha|beta|rc)\.[0-9])?")
if [ "$appVersion" != "${GITHUB_REF##*/}" ]; then
echo "Need update appVersion for Chart.yaml"
exit 1
fi
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- uses: docker/metadata-action@v4
id: meta
with:
images: ${{ github.repository_owner }}/emqx-operator-controller
tags: |
type=ref,event=branch
type=ref,event=pr
type=ref,event=tag
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- uses: docker/login-action@v2
if: startsWith(github.ref, 'refs/tags/')
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- uses: docker/build-push-action@v3
with:
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: ${{ startsWith(github.ref, 'refs/tags/') }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
context: .
- uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
repository: "${{ github.repository_owner }}/emqx-operator-controller"
readme-filepath: ./README.md
short-description: "EMQX Operator creates and manages EMQX clusters running in Kubernetes."
- id: prerelease
run: |
if echo "${{ github.ref_name }}" |egrep -q "^[0-9].[0-9].[0-9]$"; then
echo "::set-output name=prerelease::false"
else
echo "::set-output name=prerelease::true"
fi
- uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
prerelease: ${{ steps.prerelease.outputs.prerelease }}
generate_release_notes: ${{ steps.prerelease.outputs.prerelease }}
## When you use the repository's GITHUB_TOKEN to perform tasks,
## events triggered by the GITHUB_TOKEN, with the exception of workflow_dispatch and repository_dispatch,
## will not create a new workflow run.
## This prevents you from accidentally creating recursive workflow runs.
## More info: https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow
# token: ${{ github.token }}
token: ${{ secrets.CI_GIT_TOKEN }}
name: EMQX Operator ${{ github.ref_name }} Released
body_path: RELEASE.md