Skip to content

Check for dependency updates #82

Check for dependency updates

Check for dependency updates #82

name: Check for dependency updates
on:
schedule:
- cron: "0 9 * * 0"
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
sudo apt update
sudo apt install -y jq
sudo snap install 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
CHART_VALUES=charts/azimuth-llm/values.yaml
# Export vars so that they can be used by yq's strenv function
export OLD_VLLM_TAG=$(yq '.api.image.version' $CHART_VALUES)
export 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
# Can't use in-place editing with jq
jq --indent 4 --arg tag $NEW_VLLM_TAG '.properties.api.properties.image.properties.version.default = $tag' charts/azimuth-llm/values.schema.json > charts/azimuth-llm/values.schema.json.new
mv charts/azimuth-llm/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 vLLM to ${{ steps.dependency_updates.outputs.new_vllm_tag }}"
body: This PR was automatically generated by GitHub Actions.
delete-branch: true