|
| 1 | +# |
| 2 | +# Copyright (c) 2025 Huawei Technologies Co., Ltd. All Rights Reserved. |
| 3 | +# |
| 4 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | +# you may not use this file except in compliance with the License. |
| 6 | +# You may obtain a copy of the License at |
| 7 | +# |
| 8 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | +# |
| 10 | +# Unless required by applicable law or agreed to in writing, software |
| 11 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | +# See the License for the specific language governing permissions and |
| 14 | +# limitations under the License. |
| 15 | +# This file is a part of the vllm-ascend project. |
| 16 | +# |
| 17 | + |
| 18 | +name: format / pr body |
| 19 | + |
| 20 | +on: |
| 21 | + # The PR updated when PR opened and push new commits |
| 22 | + pull_request_target: |
| 23 | + types: [opened, synchronize] |
| 24 | + branches: |
| 25 | + - 'main' |
| 26 | + |
| 27 | +permissions: |
| 28 | + pull-requests: write |
| 29 | + |
| 30 | +jobs: |
| 31 | + update-description: |
| 32 | + name: update vLLM version |
| 33 | + runs-on: ubuntu-latest |
| 34 | + |
| 35 | + steps: |
| 36 | + - name: Checkout vllm-project/vllm repo |
| 37 | + uses: actions/checkout@v4 |
| 38 | + with: |
| 39 | + repository: vllm-project/vllm |
| 40 | + path: ./vllm-empty |
| 41 | + |
| 42 | + - name: Get vLLM version |
| 43 | + working-directory: ./vllm-empty |
| 44 | + run: | |
| 45 | + VLLM_COMMIT=$(git rev-parse HEAD) |
| 46 | + echo "VLLM_COMMIT=https://github.com/vllm-project/vllm/commit/$VLLM_COMMIT" >> $GITHUB_ENV |
| 47 | +
|
| 48 | + - name: Checkout repository |
| 49 | + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 50 | + |
| 51 | + - name: Set up Python |
| 52 | + uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0 |
| 53 | + |
| 54 | + - name: Get vLLM release version |
| 55 | + run: | |
| 56 | + VLLM_VERSION=$(python3 docs/source/conf.py | jq .vllm_version | tr -d '"') |
| 57 | + echo "VLLM_VERSION=$VLLM_VERSION" >> $GITHUB_ENV |
| 58 | +
|
| 59 | + - name: Update PR description |
| 60 | + env: |
| 61 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 62 | + run: | |
| 63 | + bash .github/format_pr_body.sh "${{ github.event.number }}" "${{ env.VLLM_VERSION }}" "${{ env.VLLM_COMMIT }}" |
0 commit comments