|
| 1 | +name: Check for dependency updates |
| 2 | +on: |
| 3 | + schedule: |
| 4 | + - cron: "0 9 * * *" |
| 5 | + workflow_dispatch: |
| 6 | +jobs: |
| 7 | + check_for_update: |
| 8 | + runs-on: ubuntu-latest |
| 9 | + permissions: |
| 10 | + contents: write |
| 11 | + pull-requests: write |
| 12 | + steps: |
| 13 | + |
| 14 | + - name: Checkout the config repo |
| 15 | + uses: actions/checkout@v4 |
| 16 | + with: |
| 17 | + fetch-depth: 0 |
| 18 | + fetch-tags: true |
| 19 | + |
| 20 | + - name: Check for dependency updates |
| 21 | + shell: bash |
| 22 | + id: dependency_updates |
| 23 | + run: | |
| 24 | + set -xe |
| 25 | +
|
| 26 | + # Install dependency |
| 27 | + apt update && apt install -y jq yq |
| 28 | +
|
| 29 | + # Tell git who we are for commits |
| 30 | + git config user.email "${{ github.actor }}" |
| 31 | + git config user.name "${{ github.actor }}" |
| 32 | +
|
| 33 | + # Get latest vLLM release tag and replace it in various places |
| 34 | + OLD_VLLM_TAG=$(yq '.api.image.version' chart/values.yml) |
| 35 | + NEW_VLLM_TAG=$(curl -s https://api.github.com/repos/vllm-project/vllm/releases/latest | jq .tag_name | sed s/\"//g) |
| 36 | + if [[ $OLD_VLLM_TAG != $NEW_VLLM_TAG ]]; then |
| 37 | + # Set new release tag output |
| 38 | + echo new_vllm_tag=$NEW_VLLM_TAG >> $GITHUB_OUTPUT |
| 39 | + # Update yaml in-place with yq |
| 40 | + yq e -i '.api.image.version = strenv(NEW_VLLM_TAG)' chart/values.yaml |
| 41 | + # Can't use in-place editing with jq |
| 42 | + jq --arg tag $NEW_VLLM_TAG '.properties.api.properties.image.properties.version.default = $tag' chart/values.schema.json.new |
| 43 | + mv chart/values.schema.json{.new,} |
| 44 | + fi |
| 45 | +
|
| 46 | + - name: Create Pull Request |
| 47 | + if: ${{ steps.dependency_updates.outputs.new_vllm_tag }} |
| 48 | + uses: peter-evans/create-pull-request@v6 |
| 49 | + with: |
| 50 | + base: main |
| 51 | + branch: update/vllm-${{ steps.dependency_updates.outputs.new_vllm_tag }} |
| 52 | + title: "Update dependencies" |
| 53 | + body: This PR was automatically generated by GitHub Actions. |
| 54 | + delete-branch: true |
0 commit comments