build-new-chart #8
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: Build and push helm chart | |
on: | |
repository_dispatch: | |
types: [build-new-chart] | |
jobs: | |
build_and_push: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
- name: Set up Helm | |
run: | | |
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash | |
helm version | |
- name: Log in to Helm OCI Registry | |
run: | | |
helm registry login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} | |
helm registry login ${MTR} -u ${DOCKER_USERNAME} -p ${DOCKER_PASSWORD} | |
env: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
MTR: mtr.devops.telekom.de | |
- name: Helm Lint, Package, and Push | |
run: | | |
cd deployments/chart | |
helm lint . | |
helm package . | |
helm push $(ls *.tgz | head -1) oci://ghcr.io/caas-team/charts | |
helm push $(ls *.tgz | head -1) oci://${MTR}/${REPO}/charts | |
env: | |
MTR: mtr.devops.telekom.de | |
REPO: caas | |
- name: Dispatch Event to Helm-Charts Repo | |
uses: peter-evans/repository-dispatch@v3 | |
with: | |
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | |
repository: caas-team/helm-charts | |
event-type: new-helm-chart-version | |
client-payload: '{"chart": "go-kube-downscaler", "version": "${{ github.event.client_payload.version }}"}' |