mirror of
https://github.com/komodorio/helm-dashboard.git
synced 2026-03-21 18:58:03 +00:00
Commit plugin.yaml update upon release
This commit is contained in:
11
.github/workflows/release.yaml
vendored
11
.github/workflows/release.yaml
vendored
@@ -18,26 +18,16 @@ jobs:
|
||||
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:
|
||||
@@ -106,6 +96,7 @@ jobs:
|
||||
git checkout main
|
||||
sh ./ci/bump-versions.sh
|
||||
git add charts/helm-dashboard/Chart.yaml
|
||||
git add plugin.yaml
|
||||
git commit -m "Increment chart versions [skip ci]" || echo "Already up-to-date"
|
||||
git push -f || echo "Nothing to push!"
|
||||
env:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash -e
|
||||
|
||||
WORKING_DIRECTORY="$PWD"
|
||||
|
||||
@@ -9,6 +9,7 @@ WORKING_DIRECTORY="$PWD"
|
||||
}
|
||||
|
||||
sed -i -e "s/appVersion.*/appVersion: \"${APP_VERSION}\" /g" ${HELM_CHARTS_SOURCE}/Chart.yaml
|
||||
sed -i -e "s/version.*/version: \"${APP_VERSION}\" /g" plugin.yaml
|
||||
CURRENT_VERSION=$(cat ${HELM_CHARTS_SOURCE}/Chart.yaml | grep 'version:' | awk '{print $2}')
|
||||
NEW_VERSION=$(echo $CURRENT_VERSION | awk -F. '{$NF = $NF + 1;} 1' | sed 's/ /./g')
|
||||
sed -i -e "s/${CURRENT_VERSION}/${NEW_VERSION}/g" ${HELM_CHARTS_SOURCE}/Chart.yaml
|
||||
|
||||
Reference in New Issue
Block a user