mirror of
https://github.com/komodorio/helm-dashboard.git
synced 2026-03-24 11:48:04 +00:00
* Dockerize it * Default chart layout * Installable * Starts and loads * Progressing * Hide cluster block * Add scanners * Add icon for helm chart (#130) Co-authored-by: Harshit Mehta <harshitm@nvidia.com> * Image build and push scripts * Build local img * Local img * ci stuff * ci and chart changes * add readme * modify readme * move readme location * update docs and delete file * remove file * allow write actions * allow write actions * update .gitignore * update readme * delete file * add persistence and update documentation * update logo * update volume paths and documentation * change pvc size * Comment Co-authored-by: Harshit Mehta <hdm23061993@gmail.com> Co-authored-by: Harshit Mehta <harshitm@nvidia.com> Co-authored-by: ronahk <rona@komodor.io>
125 lines
3.9 KiB
YAML
125 lines
3.9 KiB
YAML
name: release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
|
|
env:
|
|
HELM_REP: helm-charts
|
|
GH_OWNER: komodorio
|
|
CHART_DIR: charts/helm-dashboard
|
|
|
|
jobs:
|
|
pre_release:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Get plugin version
|
|
id: get_plugin_version
|
|
run: echo "PLUGIN_VERSION=$(cat plugin.yaml | grep "version" | cut -d '"' -f 2)" >> $GITHUB_OUTPUT
|
|
- name: Get tag name
|
|
id: get_tag_name
|
|
run: echo "TAG_NAME=$(echo ${{ github.ref_name }} | cut -d 'v' -f2)" >> $GITHUB_OUTPUT
|
|
outputs:
|
|
plugin_version: ${{ steps.get_plugin_version.outputs.PLUGIN_VERSION }}
|
|
release_tag: ${{ steps.get_tag_name.outputs.TAG_NAME }}
|
|
|
|
release:
|
|
needs: pre_release
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Plugin version/Tag name Check
|
|
if: needs.pre_release.outputs.release_tag != needs.pre_release.outputs.plugin_version
|
|
uses: actions/github-script@v3
|
|
with:
|
|
script: |
|
|
core.setFailed('Plugin version and tag name are not equivalent!')
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v3
|
|
with:
|
|
go-version: 1.18
|
|
- name: git cleanup
|
|
run: git clean -f
|
|
- name: Run GoReleaser
|
|
uses: goreleaser/goreleaser-action@v2
|
|
with:
|
|
version: latest
|
|
args: release --rm-dist
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Test Binary Versions
|
|
run: "dist/helm-dashboard_linux_amd64_v1/helm-dashboard --help"
|
|
|
|
image:
|
|
runs-on: ubuntu-latest
|
|
needs: release
|
|
timeout-minutes: 60
|
|
steps:
|
|
- name: Check out the repo
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Docker meta
|
|
uses: docker/metadata-action@v3
|
|
id: meta
|
|
with:
|
|
images: komodorio/helm-dashboard
|
|
|
|
- name: Login to DockerHub
|
|
uses: docker/login-action@v1
|
|
if: github.event_name != 'pull_request'
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USER }}
|
|
password: ${{ secrets.DOCKERHUB_PASS }}
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v2
|
|
if: github.event_name != 'pull_request'
|
|
with:
|
|
context: .
|
|
push: ${{ github.event_name != 'pull_request' }}
|
|
tags: ${{ needs.pre_release.outputs.release_tag }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
build-args: VER=${{ needs.pre_release.outputs.release_tag }}
|
|
|
|
publish_chart:
|
|
runs-on: ubuntu-latest
|
|
need: image
|
|
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Bump versions
|
|
run: |
|
|
git config user.email komi@komodor.io
|
|
git config user.name komodor-bot
|
|
git fetch --tags
|
|
git checkout main
|
|
sh ./ci/bump-versions.sh
|
|
git add charts/helm-dashboard/Chart.yaml
|
|
git commit -m "Increment chart versions [skip ci]" || echo "Already up-to-date"
|
|
git push -f || echo "Nothing to push!"
|
|
env:
|
|
APP_VERSION: ${{ needs.pre_release.outputs.release_tag }}
|
|
- name: Push folder to helm-charts repository
|
|
uses: crykn/copy_folder_to_another_repo_action@v1.0.6
|
|
env:
|
|
API_TOKEN_GITHUB: ${{ secrets.KOMI_WORKFLOW_TOKEN }}
|
|
with:
|
|
source_folder: "charts/helm-dashboard"
|
|
destination_repo: "komodorio/helm-charts"
|
|
destination_folder: "charts/helm-dashboard"
|
|
user_email: "komi@komodor.io"
|
|
user_name: "komodor-bot"
|
|
destination_branch: "master"
|
|
commit_msg: "feat(helm-dashboard): ${{ github.event.head_commit.message }}" #important!! don't change this commit message unless you change the condition in pipeline.yml on helm-charts repo
|