Merge release/v2.4.0 into master #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Release Chart on S3 repo | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- '**/README.md' | |
- '.github/**' | |
jobs: | |
build: | |
name: Chart release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET }} | |
aws-region: us-east-1 | |
- name: Helm release | |
uses: shellbear/[email protected] | |
with: | |
repo: ${{ secrets.AWS_BUCKET_URL }}/charts/stable | |
chart: ./ | |
- name: Reindex index.yaml | |
run: | | |
aws s3 cp ${{ secrets.AWS_BUCKET_URL }}/charts/stable/index.yaml . | |
ls | grep index.yaml | |
sed -i "s|${{ secrets.AWS_BUCKET_URL }}|${{ secrets.AWS_CLOUDFRONT_URL }}|g" index.yaml | |
aws s3 cp index.yaml ${{ secrets.AWS_BUCKET_URL }}/charts/stable/ --acl public-read | |
- name: Make public access to chart repo | |
run: | | |
mkdir s3dir | |
aws s3 cp ${{ secrets.AWS_BUCKET_URL }}/charts/stable/ ./s3dir --recursive | |
aws s3 cp ./s3dir ${{ secrets.AWS_BUCKET_URL }}/charts/stable --acl public-read --recursive | |
- name: Invalidate CLOUDFRONT cache | |
run: aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_DISTRIBUTION_ID }} --paths "/charts/stable/*" |