mirror of
https://github.com/emqx/neuron.git
synced 2026-10-17 04:40:42 +08:00
45 lines
1.3 KiB
YAML
45 lines
1.3 KiB
YAML
name: Release neuron
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "*"
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Check appVersion for helm
|
|
run: |
|
|
appVersion=$(egrep "^appVersion" deploy/charts/neuron/Chart.yaml | sed -r 's|^appVersion:[[:space:]]([0-9]+.[0-9]+.[0-9]+)$|\1|g')
|
|
if [ "$appVersion" != "${GITHUB_REF##*/}" ]; then
|
|
echo "Need update appVersion for Chart.yaml"
|
|
exit 1
|
|
fi
|
|
|
|
helm:
|
|
runs-on: self-hosted
|
|
if: github.repository_owner == 'emqx'
|
|
needs:
|
|
- release
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Check appVersion for helm
|
|
working-directory: deploy/charts/neuron
|
|
run: |
|
|
appVersion=$(egrep "^appVersion" Chart.yaml | sed -r 's|^appVersion:[[:space:]]([0-9]+.[0-9]+.[0-9]+)$|\1|g')
|
|
if [ "$appVersion" != "${GITHUB_REF##*/}" ]; then
|
|
echo "Need update appVersion for Chart.yaml"
|
|
exit 1
|
|
fi
|
|
- name: Update helm repo
|
|
uses: emqx/push-helm-action@v1
|
|
with:
|
|
charts_dir: "${{ github.workspace }}/deploy/charts/neuron"
|
|
version: ${{ github.ref_name }}
|
|
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
|
aws_region: "us-west-2"
|
|
aws_bucket_name: "repos-emqx-io"
|