Bump lobehub/lobe-chat from v0.122.6 to v0.122.7 in /charts/lobe-chat #18
Workflow file for this run
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
name: Lobe-chat - Update Helm | |
on: | |
pull_request_target: | |
branches: | |
- 'main' | |
types: | |
- opened | |
paths: | |
- 'charts/lobe-chat/values.yaml' | |
jobs: | |
update-version: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.head_ref }} | |
fetch-depth: 0 | |
- name: Get app version | |
id: app_version | |
run: | | |
APP_VERSION=$(grep 'tag: ' charts/lobe-chat/values.yaml | cut -d ':' -f 2 | tr -d ' ') | |
echo "::set-output name=version::${APP_VERSION}" | |
- name: Get chart version | |
id: chart_version | |
run: | | |
CHART_VERSION=$(grep 'version: ' charts/lobe-chat/Chart.yaml | cut -d ':' -f 2 | tr -d ' ') | |
echo "::set-output name=version::${CHART_VERSION}" | |
- name: Update App Version | |
run: | | |
sed -i "s/appVersion:.*/appVersion: \"${{ steps.app_version.outputs.version }}\"/" charts/lobe-chat/Chart.yaml | |
- name: Update Chart Version | |
id: update_chart_version | |
run: | | |
major=$(echo ${{ steps.chart_version.outputs.version }} | cut -d. -f1) | |
minor=$(echo ${{ steps.chart_version.outputs.version }} | cut -d. -f2) | |
patch=$(echo ${{ steps.chart_version.outputs.version }} | cut -d. -f3) | |
patch=$((patch + 1)) | |
version="${major}.${minor}.${patch}" | |
sed -i "s/version:.*/version: $version/" charts/lobe-chat/Chart.yaml | |
echo "::set-output name=version::${version}" | |
- name: Commit changes | |
run: | | |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git add . | |
git commit --amend -m "Update chart version to ${{ steps.update_chart_version.outputs.version }} and app version to ${{ steps.app_version.outputs.version }}" | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.head_ref }} | |
force: true |