diff --git a/.github/workflows/update-dependencies.yml b/.github/workflows/update-dependencies.yml new file mode 100644 index 0000000..8c3bd83 --- /dev/null +++ b/.github/workflows/update-dependencies.yml @@ -0,0 +1,54 @@ +name: Check for dependency updates +on: + schedule: + - cron: "0 9 * * *" + workflow_dispatch: +jobs: + check_for_update: + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + steps: + + - name: Checkout the config repo + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Check for dependency updates + shell: bash + id: dependency_updates + run: | + set -xe + + # Install dependency + apt update && apt install -y jq yq + + # Tell git who we are for commits + git config user.email "${{ github.actor }}" + git config user.name "${{ github.actor }}" + + # Get latest vLLM release tag and replace it in various places + OLD_VLLM_TAG=$(yq '.api.image.version' chart/values.yml) + NEW_VLLM_TAG=$(curl -s https://api.github.com/repos/vllm-project/vllm/releases/latest | jq .tag_name | sed s/\"//g) + if [[ $OLD_VLLM_TAG != $NEW_VLLM_TAG ]]; then + # Set new release tag output + echo new_vllm_tag=$NEW_VLLM_TAG >> $GITHUB_OUTPUT + # Update yaml in-place with yq + yq e -i '.api.image.version = strenv(NEW_VLLM_TAG)' chart/values.yaml + # Can't use in-place editing with jq + jq --arg tag $NEW_VLLM_TAG '.properties.api.properties.image.properties.version.default = $tag' chart/values.schema.json.new + mv chart/values.schema.json{.new,} + fi + + - name: Create Pull Request + if: ${{ steps.dependency_updates.outputs.new_vllm_tag }} + uses: peter-evans/create-pull-request@v6 + with: + base: main + branch: update/vllm-${{ steps.dependency_updates.outputs.new_vllm_tag }} + title: "Update dependencies" + body: This PR was automatically generated by GitHub Actions. + delete-branch: true