-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
42 additions
and
47 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,47 +9,20 @@ on: | |
paths: | ||
- "charts/**" | ||
|
||
env: | ||
BASE_VERSION: "1.0" | ||
|
||
jobs: | ||
set-version: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
version: ${{ steps.version.outputs.version }} | ||
steps: | ||
- name: Set version | ||
id: version | ||
run: | | ||
BRANCH_NAME="${{ github.ref_name }}" | ||
if [[ "${BRANCH_NAME}" == "main" ]] | ||
then | ||
echo 'version=${{env.BASE_VERSION}}.${{ github.run_number }}' | tee -a $GITHUB_OUTPUT | ||
else | ||
# Normalize branch name | ||
fixedBranchName=$(echo "${BRANCH_NAME}" | sed 's/origin\///; s/\//-/g; s/_/-/g; s/.*/\L&/') | ||
if [ ${#fixedBranchName} -gt 21 ]; then | ||
fixedBranchName="${fixedBranchName:0:20}" | ||
# remove dash at the end | ||
while [ "${fixedBranchName: -1}" = "-" ]; do | ||
fixedBranchName="${fixedBranchName%?}" | ||
done | ||
fi | ||
VERSION="${{env.BASE_VERSION}}-${fixedBranchName}.${{ github.run_number }}" | ||
echo "version=${VERSION}" | tee -a $GITHUB_OUTPUT | ||
fi | ||
|
||
publish-helm-chart: | ||
needs: | ||
- set-version | ||
runs-on: ubuntu-latest | ||
env: | ||
VERSION_NAME: ${{ needs.set-version.outputs.version }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
||
- name: Install Helm | ||
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5 | ||
with: | ||
version: v3.13.0 | ||
|
||
- name: Run lint on Helm chart | ||
run: | | ||
set -e | ||
|
@@ -59,29 +32,33 @@ jobs: | |
helm lint --values values.yaml . | ||
cd - | ||
- name: Package helm chart | ||
run: | | ||
mkdir -p .cr-release-packages | ||
cd .cr-release-packages | ||
helm package --version ${{env.VERSION_NAME}} ../charts/public-test/ | ||
cd - | ||
# - name: Package helm chart | ||
# run: | | ||
# mkdir -p .cr-release-packages | ||
# cd .cr-release-packages | ||
# helm package --version ${{env.VERSION_NAME}} ../charts/public-test/ | ||
# cd - | ||
|
||
- name: Configure Git user | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "github-actions" | ||
- name: Run chart-releaser | ||
uses: helm/[email protected] | ||
# with: | ||
# skip_packaging: true | ||
# skip_existing: true | ||
# packages_with_index: true | ||
uses: helm/chart-releaser-action@be16258da8010256c6e82849661221415f031968 # v1.5.0 | ||
with: | ||
charts_dir: charts | ||
env: | ||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
- name: Summary | ||
run: | | ||
echo "Helm chart is published, version is : ${{env.VERSION_NAME}}" >> $GITHUB_STEP_SUMMARY | ||
# - name: Run chart-releaser | ||
# uses: helm/[email protected] | ||
# # with: | ||
# # skip_packaging: true | ||
# # skip_existing: true | ||
# # packages_with_index: true | ||
# env: | ||
# CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,19 @@ | ||
# public-test | ||
# public-test | ||
|
||
## Usage | ||
Helm must be installed to use the charts. Please refer to Helm’s documentation to get started. | ||
|
||
Once Helm has been set up correctly, add the repo as follows: | ||
``` bash | ||
helm repo add public-test https://comet-ml.github.io/public-test | ||
``` | ||
If you had already added this repo earlier, run helm repo update to retrieve the latest versions of the packages. You can then run helm search repo public-test to see the charts. | ||
|
||
To install the public-test chart: | ||
``` bash | ||
helm install public-test public-test/public-test | ||
``` | ||
To uninstall the chart: | ||
``` | ||
helm delete public-test | ||
``` |
Binary file not shown.