Skip to content

PR should merge from update-weaviate-image branch #8

PR should merge from update-weaviate-image branch

PR should merge from update-weaviate-image branch #8

name: Update weaviate server image
on:
push:
branches:
- weaviate-server
pull_request:
branches:
- weaviate-server
workflow_dispatch:
schedule:
- cron: '0 0 * * 1' # Every Monday at 00:00 UTC
jobs:
update-version:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up required tools
run: |
sudo apt-get update
sudo apt-get install -y jq
- name: Update Image
run: make update-weaviate-image
- name: Commit and push if changed
run: |
git config --global user.name '${{ github.actor }}'
git config --global user.email '${{ github.actor }}@users.noreply.github.com'
git add tests/docker-compose.yml
git diff-index --quiet HEAD || (git checkout -b update-weaviate-image && git commit -m "Update Weaviate version in tests/docker-compose.yml" && git push --set-upstream origin update-weaviate-image)
- name: Create Pull Request
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { repo, owner } = context.repo;
const result = await github.rest.pulls.create({
title: 'Update Weaviate Server Image',
owner,
repo,
head: 'update-weaviate-image',
base: 'main',
body: [
'This PR updates the Weaviate version in tests/docker-compose.yml',
'This PR is auto-generated by',
'[actions/github-script](https://github.com/actions/github-script).'
].join('\n')
});
github.rest.issues.addLabels({
owner,
repo,
issue_number: result.data.number,
labels: ['quality-improvement', 'automated pr']
});