Skip to content

Commit

Permalink
only create the PR if there is a version change
Browse files Browse the repository at this point in the history
  • Loading branch information
hsm207 committed Jan 26, 2024
1 parent e3b09e7 commit c388a17
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/update-weaviate-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@ jobs:
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 ${{ env.SOURCE_BRANCH_NAME }} &&
git commit -m "Update Weaviate version in tests/docker-compose.yml" &&
git push --set-upstream origin ${{ env.SOURCE_BRANCH_NAME }}
)
git diff-index --quiet HEAD && echo "::set-output name=changed::false" || (
echo "::set-output name=changed::true"
git checkout -b ${{ env.SOURCE_BRANCH_NAME }} &&
git commit -m "Update Weaviate version in tests/docker-compose.yml" &&
git push --set-upstream origin ${{ env.SOURCE_BRANCH_NAME }}
)
- name: Create Pull Request
if: steps.commit.outputs.changed == 'true'
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit c388a17

Please sign in to comment.