Skip to content

Commit

Permalink
feat(helm): add release action
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandrevilain committed Dec 28, 2023
1 parent 145c899 commit eac7fe0
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 1 deletion.
52 changes: 52 additions & 0 deletions .github/workflows/release-chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Release Charts

on:
push:
branches:
# - main
- feat/helm-release-action

env:
GO_VERSION: "1.21.5"

jobs:
release:
## if: startsWith(github.ref, 'refs/tags/chart-v') == true
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
check-latest: true

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Generate operator chart
run: make helm

- name: Install Helm
uses: azure/setup-helm@v3

- name: Create releaser configuration
run: |
cat <<EOF > cr.yaml
release-name-template: "chart-{{ .Version }}"
make-release-latest: false
EOF
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.6.0
with:
charts_dir: charts
config: cr.yaml
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ artifacts: kustomize
$(KUSTOMIZE) build config/default > ${RELEASE_PATH}/temporal-operator.yaml

.PHONY: helm
helm: manifests
helm: manifests artifacts
cp ${RELEASE_PATH}/temporal-operator.crds.yaml charts/temporal-operator/crds

.PHONY: bundle
Expand Down

0 comments on commit eac7fe0

Please sign in to comment.