mirror of
https://github.com/komodorio/helm-dashboard.git
synced 2026-03-24 11:48:04 +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
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
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
|
- name: Get tag name
|
||||||
id: get_tag_name
|
id: get_tag_name
|
||||||
run: echo "TAG_NAME=$(echo ${{ github.ref_name }} | cut -d 'v' -f2)" >> $GITHUB_OUTPUT
|
run: echo "TAG_NAME=$(echo ${{ github.ref_name }} | cut -d 'v' -f2)" >> $GITHUB_OUTPUT
|
||||||
outputs:
|
outputs:
|
||||||
plugin_version: ${{ steps.get_plugin_version.outputs.PLUGIN_VERSION }}
|
|
||||||
release_tag: ${{ steps.get_tag_name.outputs.TAG_NAME }}
|
release_tag: ${{ steps.get_tag_name.outputs.TAG_NAME }}
|
||||||
|
|
||||||
release:
|
release:
|
||||||
needs: pre_release
|
needs: pre_release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
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
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
@@ -106,6 +96,7 @@ jobs:
|
|||||||
git checkout main
|
git checkout main
|
||||||
sh ./ci/bump-versions.sh
|
sh ./ci/bump-versions.sh
|
||||||
git add charts/helm-dashboard/Chart.yaml
|
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 commit -m "Increment chart versions [skip ci]" || echo "Already up-to-date"
|
||||||
git push -f || echo "Nothing to push!"
|
git push -f || echo "Nothing to push!"
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash -e
|
||||||
|
|
||||||
WORKING_DIRECTORY="$PWD"
|
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/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}')
|
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')
|
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
|
sed -i -e "s/${CURRENT_VERSION}/${NEW_VERSION}/g" ${HELM_CHARTS_SOURCE}/Chart.yaml
|
||||||
|
|||||||
Reference in New Issue
Block a user