Skip to content

update-helm-chart

update-helm-chart #596

Workflow file for this run

name: Update chart image tags
on:
repository_dispatch:
types: [update-helm-chart]
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Install yq
run: sudo snap install yq
- name: Update dashboard image tag
if: ${{ github.event.client_payload.dashboard_tag }}
run: yq e '.services.dashboard.image.tag = "${{ github.event.client_payload.dashboard_tag }}"' -i cryptlex/cryptlex-enterprise/values.yaml
- name: Update admin portal image tag
if: ${{ github.event.client_payload.web_portal_tag }}
run: yq e '.services.adminPortal.image.tag = "${{ github.event.client_payload.web_portal_tag }}"' -i cryptlex/cryptlex-enterprise/values.yaml
- name: Update customer portal image tag
if: ${{ github.event.client_payload.web_portal_tag }}
run: yq e '.services.customerPortal.image.tag = "${{ github.event.client_payload.web_portal_tag }}"' -i cryptlex/cryptlex-enterprise/values.yaml
- name: Update reseller portal image tag
if: ${{ github.event.client_payload.web_portal_tag }}
run: yq e '.services.resellerPortal.image.tag = "${{ github.event.client_payload.web_portal_tag }}"' -i cryptlex/cryptlex-enterprise/values.yaml
- name: Update web api image tag
if: ${{ github.event.client_payload.web_api_tag }}
run: yq e '.services.webApi.image.tag = "${{ github.event.client_payload.web_api_tag }}"' -i cryptlex/cryptlex-enterprise/values.yaml
- name: Update release server image tag
if: ${{ github.event.client_payload.release_server_tag }}
run: yq e '.services.releaseServer.image.tag = "${{ github.event.client_payload.release_server_tag }}"' -i cryptlex/cryptlex-enterprise/values.yaml
- name: Get current chart version
id: chartVersion
run: echo "##[set-output name=version;]$(yq e '.version' cryptlex/cryptlex-enterprise/Chart.yaml)"
- name: Get next minor version
id: semvers
uses: "WyriHaximus/github-action-next-semvers@v1"
with:
version: ${{ steps.chartVersion.outputs.version }}
- name: Update chart version
run: |
yq e '.version = "${{ steps.semvers.outputs.patch }}"' -i cryptlex/cryptlex-enterprise/Chart.yaml
yq e '.appVersion = "${{ steps.semvers.outputs.patch }}"' -i cryptlex/cryptlex-enterprise/Chart.yaml
- name: Commit files
run: |
git add ./cryptlex/cryptlex-enterprise/*.yaml
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git commit -m "Updated images" -a | exit 0
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.REPO_ACCESS_TOKEN }}