From f62d3d96a549e2cacfc698aeb3d1e3ebd13b6b4b Mon Sep 17 00:00:00 2001 From: Minura Punchihewa Date: Fri, 31 May 2024 10:47:01 +0530 Subject: [PATCH 1/4] updated the MindsDB image to most recent tag --- docker-compose.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index 4d1fb236..ad959886 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,6 +1,6 @@ services: mindsdb: - image: mindsdb/mindsdb:latest + image: mindsdb/mindsdb:v24.5.4.0 ports: - "47334:47334" - "47335:47335" From 9fbc3323d0e8ae08583a130552a905769ee01f19 Mon Sep 17 00:00:00 2001 From: Minura Punchihewa Date: Fri, 31 May 2024 10:47:37 +0530 Subject: [PATCH 2/4] created a new workflow to bump the MindsDB version --- .github/workflows/bump-mindsdb-version.yml | 64 ++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 .github/workflows/bump-mindsdb-version.yml diff --git a/.github/workflows/bump-mindsdb-version.yml b/.github/workflows/bump-mindsdb-version.yml new file mode 100644 index 00000000..99575e83 --- /dev/null +++ b/.github/workflows/bump-mindsdb-version.yml @@ -0,0 +1,64 @@ +name: Bump MindsDB Version and Push Extension + +on: + repository_dispatch: + types: [completed] + +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_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 From 0fce8a051af149da4a9ad5d909ea82077c0d89dd Mon Sep 17 00:00:00 2001 From: Minura Punchihewa Date: Fri, 31 May 2024 10:51:50 +0530 Subject: [PATCH 3/4] added a workflow_dispatch event for manual testing --- .github/workflows/bump-mindsdb-version.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/bump-mindsdb-version.yml b/.github/workflows/bump-mindsdb-version.yml index 99575e83..2a125811 100644 --- a/.github/workflows/bump-mindsdb-version.yml +++ b/.github/workflows/bump-mindsdb-version.yml @@ -4,6 +4,12 @@ on: repository_dispatch: types: [completed] + workflow_dispatch: + inputs: + version: + description: "Version to bump to" + required: true + jobs: bump-version: runs-on: ubuntu-latest From fa57ecd04c2ed7a81d49cb58f844e4165ebe65ae Mon Sep 17 00:00:00 2001 From: Minura Punchihewa Date: Fri, 31 May 2024 11:28:23 +0530 Subject: [PATCH 4/4] fixed a couple of bugs in the workflow --- .github/workflows/bump-mindsdb-version.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/bump-mindsdb-version.yml b/.github/workflows/bump-mindsdb-version.yml index 2a125811..a8698d33 100644 --- a/.github/workflows/bump-mindsdb-version.yml +++ b/.github/workflows/bump-mindsdb-version.yml @@ -4,11 +4,11 @@ on: repository_dispatch: types: [completed] - workflow_dispatch: - inputs: - version: - description: "Version to bump to" - required: true + workflow_dispatch: + inputs: + version: + description: "Version to bump to" + required: true jobs: bump-version: @@ -35,7 +35,7 @@ jobs: current_extension_version=$(cat VERSION) # Increment extension version (increment the last number by 1) - new_extension_version=$(echo $current_version | awk -F. '{$NF = $NF + 1;} 1' | sed 's/ /./g') + 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