Skip to content

Commit

Permalink
chore: 💚 forgot git config
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnaudTA committed Sep 17, 2024
1 parent b96b0ff commit acdca5b
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions .github/workflows/update-chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,28 +52,26 @@ jobs:
- name: Checks-out repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: latest

- name: update chart version
id: update-chart
run: |
npm i -g semver
CHART_VERSION=$(yq .version charts/${{ inputs.CHART_NAME }}/Chart.yaml)
NEXT_VERSION=$(semver -i ${{ inputs.UPGRADE_TYPE }} $CHART_VERSION)
sed -i "s/appVersion: .*/appVersion: ${{ inputs.APP_VERSION }}/" charts/${{ inputs.CHART_NAME }}/Chart.yaml
sed -i "s/version: .*/version: $NEXT_VERSION/" charts/${{ inputs.CHART_NAME }}/Chart.yaml
sed -i "s/^appVersion: .*/appVersion: ${{ inputs.APP_VERSION }}/" charts/${{ inputs.CHART_NAME }}/Chart.yaml
sed -i "s/^version: .*/version: $NEXT_VERSION/" charts/${{ inputs.CHART_NAME }}/Chart.yaml
docker run --rm --volume "$(pwd)/charts/${{ inputs.CHART_NAME }}:/helm-docs" -u $(id -u) jnorwood/helm-docs:latest
git co -b ${{ inputs.CHART_NAME }}-$NEXT_VERSION
git commit -m "chore: :arrow_up: upgrade ${{ inputs.CHART_NAME }} to ${{ inputs.APP_VERSION }}" -a
git push --set-upstream origin ${{ inputs.CHART_NAME }}-$NEXT_VERSION
echo "BRANCH_PR=${{ inputs.CHART_NAME }}-$NEXT_VERSION" >> $GITHUB_OUTPUT
- name: Create pull request
uses: peter-evans/[email protected]
with:
branch: ${{ steps.update-chart.outputs.BRANCH_PR }}
base: main
title: Update ${{ inputs.CHART_NAME }} to ${{ inputs.APP_VERSION }}
add-paths: |
**/**
commit-message: "chore: :arrow_up: upgrade ${{ inputs.CHART_NAME }} to ${{ inputs.APP_VERSION }}"
draft: false

0 comments on commit acdca5b

Please sign in to comment.