Skip to content

Commit

Permalink
ci: add output of new version for PR creation
Browse files Browse the repository at this point in the history
Signed-off-by: Romain Billon <[email protected]>
  • Loading branch information
Rbillon59 committed Oct 29, 2024
1 parent 929e160 commit 199425a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/update-to-latest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,26 @@ jobs:
uses: actions/checkout@v4

- name: update addon configuration in config.json
id: n8n_latest_version
run: |
actual_config=$(cat config.json | jq -r ".version" | awk -F"." '{print $3}')
new_config=$((actual_config+1))
actual_version=$(cat config.json | jq -r ".version" | awk -F"." '{print $1"."$2}')
new_version="${actual_version}.${new_config}"
jq ".version = \"${new_version}\"" config.json > config.json.tmp && mv config.json.tmp config.json
n8n_version=$(cat Dockerfile | grep "FROM" | awk -F":" '{print $2}')
echo "::set-output name=new_version::${new_version}"
sed -i "s/## \[Unreleased\]/## \[Unreleased\]\n\n## [ ${new_version} ] - $(date +%Y-%m-%d) \n\n Bump n8n to ${n8n_version} /g" CHANGELOG.md
- name: create pull request
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.CR_PAT }}
commit-message: Update n8n to ${{ steps.n8n_latest_version.outputs.latest_release }}
commit-message: Update n8n to ${{ steps.n8n_latest_version.outputs.new_version }}
title: Update n8n to ${{ steps.n8n_latest_version.outputs.latest_release }}
body: |
Update n8n to ${{ steps.n8n_latest_version.outputs.latest_release }}
branch: update-n8n-${{ steps.n8n_latest_version.outputs.latest_release }}
Update n8n to ${{ steps.n8n_latest_version.outputs.new_version }}
branch: update-n8n-${{ steps.n8n_latest_version.outputs.new_version }}
labels: |
n8n
update

0 comments on commit 199425a

Please sign in to comment.