Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Workflow to Update MindsDB Version Automatically #36

Merged
merged 4 commits into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions .github/workflows/bump-mindsdb-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Bump MindsDB Version and Push Extension

on:
repository_dispatch:
types: [completed]

workflow_dispatch:
inputs:
version:
description: "Version to bump to"
required: true

jobs:
bump-version:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Debug event
run: echo ${{ toJson(github.event) }} # Output the entire event payload for debugging

- name: Set up Git
run: |
git config --global user.email "actions@github.com"
git config --global user.name "GitHub Actions"

- name: Create new branch
run: |
git checkout -b mindsdb-version-update-${{ github.event.client_payload.version }}

- 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:v${{ github.event.client_payload.version }}|' docker-compose.yml

# Commit changes
git add docker-compose.yml
git commit -m "Update MindsDB version to ${{ github.event.client_payload.version }}"

- name: Push changes
run: git push origin mindsdb-version-update-${{ github.event.client_payload.version }}

- name: Create pull request
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Bump MindsDB version to ${{ github.event.client_payload.version }}"
title: "Bump MindsDB version to ${{ github.event.client_payload.version }}"
body: "Bump MindsDB version to ${{ github.event.client_payload.version }}"
branch: mindsdb-version-update-${{ github.event.client_payload.version }}
base: main
labels: "automated-pr"
reviewers: "MinuraPunchihewa,ZoranPandovski"
draft: false
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
mindsdb:
image: mindsdb/mindsdb:latest
image: mindsdb/mindsdb:v24.5.4.0
ports:
- "47334:47334"
- "47335:47335"
Expand Down