Merge pull request #9431 from id/ci-add-manual-workflow-to-upload-helm-charts
ci: add separate manual workflow to upload charts
This commit is contained in:
commit
4fb2e45bb5
|
@ -90,12 +90,3 @@ jobs:
|
||||||
-d "{\"ref\":\"v1.0.4\",\"inputs\":{\"version\": \"${{ github.ref_name }}\"}}" \
|
-d "{\"ref\":\"v1.0.4\",\"inputs\":{\"version\": \"${{ github.ref_name }}\"}}" \
|
||||||
"https://api.github.com/repos/emqx/emqx-ci-helper/actions/workflows/update_emqx_homebrew.yaml/dispatches"
|
"https://api.github.com/repos/emqx/emqx-ci-helper/actions/workflows/update_emqx_homebrew.yaml/dispatches"
|
||||||
fi
|
fi
|
||||||
- uses: emqx/push-helm-action@v1
|
|
||||||
if: github.event_name == 'release' || inputs.publish_release_artefacts
|
|
||||||
with:
|
|
||||||
charts_dir: "${{ github.workspace }}/deploy/charts/${{ steps.profile.outputs.profile }}"
|
|
||||||
version: ${{ steps.profile.outputs.version }}
|
|
||||||
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"
|
|
||||||
|
|
|
@ -0,0 +1,52 @@
|
||||||
|
name: Upload helm charts
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types:
|
||||||
|
- published
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
tag:
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
upload:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
steps:
|
||||||
|
- uses: aws-actions/configure-aws-credentials@v1-node16
|
||||||
|
with:
|
||||||
|
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||||
|
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
|
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
ref: ${{ github.event.inputs.tag }}
|
||||||
|
- name: Detect profile
|
||||||
|
id: profile
|
||||||
|
run: |
|
||||||
|
if git describe --tags --match '[v|e]*' --exact; then
|
||||||
|
REF=$(git describe --tags --match '[v|e]*' --exact)
|
||||||
|
else
|
||||||
|
echo "Only release tags matching '[v|e]*' are supported"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
case "$REF" in
|
||||||
|
v*)
|
||||||
|
echo "profile=emqx" >> $GITHUB_OUTPUT
|
||||||
|
echo "version=$(./pkg-vsn.sh emqx)" >> $GITHUB_OUTPUT
|
||||||
|
;;
|
||||||
|
e*)
|
||||||
|
echo "profile=emqx-enterprise" >> $GITHUB_OUTPUT
|
||||||
|
echo "version=$(./pkg-vsn.sh emqx-enterprise)" >> $GITHUB_OUTPUT
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
- uses: emqx/push-helm-action@v1
|
||||||
|
with:
|
||||||
|
charts_dir: "${{ github.workspace }}/deploy/charts/${{ steps.profile.outputs.profile }}"
|
||||||
|
version: ${{ steps.profile.outputs.version }}
|
||||||
|
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"
|
Loading…
Reference in New Issue