Skip to content

Merge pull request #25 from energywebfoundation/feat/enable_redis_con… #30

Merge pull request #25 from energywebfoundation/feat/enable_redis_con…

Merge pull request #25 from energywebfoundation/feat/enable_redis_con… #30

Workflow file for this run

name: Semantic release
on:
push:
branches:
- master
paths:
- Chart.yaml
jobs:
cancel-previous:
name: Cancel Previous Runs
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
semantic-version:
name: Semantic release
runs-on: ubuntu-latest
needs: [cancel-previous]
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
release_branches: master
custom_release_rules: major:major:Major Changes,minor:minor:Minor Changes,chore:patch:Chores
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Package & push helm chart (AWS)
env:
HELM_EXPERIMENTAL_OCI: 1
run: |
aws ecr-public get-login-password --region us-east-1 | helm registry login --username AWS --password-stdin public.ecr.aws
helm package --dependency-update .
CHART_NAME=$( grep 'name:' Chart.yaml | head -n 1)
CHART_NAME=${CHART_NAME//*name: /}
helm push ${CHART_NAME}-${{ steps.tag_version.outputs.new_version }}.tgz oci://public.ecr.aws/p2b6f2f9
- name: Azure Login
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Azure CLI deploy to ACR
uses: azure/CLI@v1
with:
azcliversion: 2.34.1
inlineScript: |
az acr helm install-cli --client-version 3.6.3 --yes
CHART_NAME=$( grep 'name:' Chart.yaml | head -n 1)
CHART_NAME=${CHART_NAME//*name: /}
helm package .
az acr helm push -n ${{ secrets.AZURE_HELM_REGISTRY }} ${CHART_NAME}-${{ steps.tag_version.outputs.new_version }}.tgz
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}