Skip to content

Merge pull request #121 from Rbillon59/renovate/docker.n8n.io-n8nio-n… #110

Merge pull request #121 from Rbillon59/renovate/docker.n8n.io-n8nio-n…

Merge pull request #121 from Rbillon59/renovate/docker.n8n.io-n8nio-n… #110

on:
push:
branches:
- master
paths:
- 'Dockerfile'
workflow_dispatch:
jobs:
n8n_latest_release:
runs-on: ubuntu-latest
steps:
- name: Checkout
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::${n8n_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.new_version }}
title: Update n8n to ${{ steps.n8n_latest_version.outputs.new_version }}
body: |
Update n8n to ${{ steps.n8n_latest_version.outputs.new_version }}
branch: update-n8n-${{ steps.n8n_latest_version.outputs.new_version }}
labels: |
n8n
update