Skip to content

Bump MindsDB Version and Push Extension #34

Bump MindsDB Version and Push Extension

Bump MindsDB Version and Push Extension #34

name: Bump MindsDB Version and Push Extension
on:
workflow_dispatch:
inputs:
image-tag:
required: true
permissions:
contents: write
pull-requests: write
jobs:
bump-version:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Debug event
run: echo "${{ toJson(github.event) }}"
- name: Set up Git
run: |
git config --global user.email "actions@github.com"
git config --global user.name "GitHub Actions"
- name: Update extension version
run: |
# Read current extension version
current_extension_version=$(cat VERSION)
# Increment extension version (increment the last number by 1)
new_extension_version=$(echo $current_extension_version | awk -F. '{$NF = $NF + 1;} 1' | sed 's/ /./g')
# Update VERSION file with new version
echo $new_extension_version > VERSION
# Commit changes
git add VERSION
git commit -m "Update extension version to $new_extension_version"
- name: Update MindsDB version
run: |
# Update MindsDB version
sed -i 's|mindsdb/mindsdb:v[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*|mindsdb/mindsdb:${{ github.event.inputs.image-tag }}|' docker-compose.yaml
# Commit changes
git add docker-compose.yaml
git commit -m "Update MindsDB version to ${{ github.event.inputs.image-tag }}"
- name: Create pull request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: "Bump MindsDB version to ${{ github.event.inputs.image-tag }}"
body: "This is an automated PR that bumps the version of the MindsDB image to ${{ github.event.inputs.image-tag }} in response to the latest release that has been made."
branch: release/mindsdb-version-update-${{ github.event.inputs.image-tag }}
base: main
labels: "automated-pr"
reviewers: "MinuraPunchihewa,ZoranPandovski"
draft: false