Skip to content

Commit

Permalink
Create helm chart pipeline and update release workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Heba Elayoty <[email protected]>
  • Loading branch information
helayoty committed Sep 10, 2023
1 parent ba02eb0 commit 39eb5dc
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 48 deletions.
47 changes: 0 additions & 47 deletions .github/workflows/create-release-pull-request.yml

This file was deleted.

27 changes: 27 additions & 0 deletions .github/workflows/helm-chart.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: publish_helm_chart

on:
workflow_run:
workflows: [ "Create, Scan and Publish KDM image" ]
types: [ completed ]
branches: [ release-** ]

jobs:
release:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Run chart-releaser
uses: helm/[email protected]
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,13 @@ lint: $(GOLANGCI_LINT)

## --------------------------------------
## Release
## To create a release, run `make release VERSION=x.y.z`
## --------------------------------------
.PHONY: release-manifest
release-manifest:
@sed -i -e 's/^VERSION ?= .*/VERSION ?= ${VERSION}/' ./Makefile
@sed -i -e "s/version: .*/version: ${IMG_TAG}/" ./charts/kdm/Chart.yaml
@sed -i -e "s/tag: .*/tag: ${IMG_TAG}/" ./charts/kdm/values.yaml
@sed -i -e 's/RELEASE_TAG=.*/RELEASE_TAG=${IMG_TAG}/' ./charts/README.md
@sed -i -e 's/IMG_TAG=.*/IMG_TAG=${IMG_TAG}/' ./charts/README.md
git add ./Makefile ./charts/kdm/Chart.yaml ./charts/kdm/values.yaml ./charts/README.md
git commit -s -m "release: update manifest and helm charts for ${VERSION}"

0 comments on commit 39eb5dc

Please sign in to comment.