|
| 1 | +# Licensed to the Apache Software Foundation (ASF) under one |
| 2 | +# or more contributor license agreements. See the NOTICE file |
| 3 | +# distributed with this work for additional information |
| 4 | +# regarding copyright ownership. The ASF licenses this file |
| 5 | +# to you under the Apache License, Version 2.0 (the |
| 6 | +# "License"); you may not use this file except in compliance |
| 7 | +# with the License. You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, |
| 12 | +# software distributed under the License is distributed on an |
| 13 | +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 14 | +# KIND, either express or implied. See the License for the |
| 15 | +# specific language governing permissions and limitations |
| 16 | +# under the License. |
| 17 | + |
| 18 | +name: Publish Python VLLM Image |
| 19 | + |
| 20 | +on: |
| 21 | + schedule: |
| 22 | + - cron: '0 0 * * 0' # Run weekly (Sunday at 00:00) |
| 23 | + workflow_dispatch: |
| 24 | + |
| 25 | +# Setting explicit permissions for the action to avoid the default permissions |
| 26 | +permissions: |
| 27 | + actions: write |
| 28 | + pull-requests: read |
| 29 | + checks: read |
| 30 | + contents: read |
| 31 | + deployments: read |
| 32 | + id-token: none |
| 33 | + issues: read |
| 34 | + discussions: read |
| 35 | + packages: read |
| 36 | + pages: read |
| 37 | + repository-projects: read |
| 38 | + security-events: read |
| 39 | + statuses: read |
| 40 | + |
| 41 | +# This allows a subsequently queued workflow run to interrupt previous runs |
| 42 | +concurrency: |
| 43 | + group: '${{ github.workflow }} @ ${{ github.event.issue.number || github.sha || github.head_ref || github.ref }}-${{ github.event.schedule || github.event.comment.id || github.event.sender.login }}' |
| 44 | + cancel-in-progress: true |
| 45 | + |
| 46 | +jobs: |
| 47 | + build_and_push_image: |
| 48 | + if: | |
| 49 | + github.event_name == 'workflow_dispatch' || |
| 50 | + (github.event_name == 'schedule' && github.repository == 'apache/beam') |
| 51 | + runs-on: [self-hosted, ubuntu-24.04, main] |
| 52 | + timeout-minutes: 60 |
| 53 | + steps: |
| 54 | + - name: Checkout code |
| 55 | + uses: actions/checkout@v7 |
| 56 | + - name: Authenticate on GCP |
| 57 | + uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 |
| 58 | + with: |
| 59 | + service_account: ${{ secrets.GCP_SA_EMAIL }} |
| 60 | + credentials_json: ${{ secrets.GCP_SA_KEY }} |
| 61 | + - name: Set up Cloud SDK |
| 62 | + uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db |
| 63 | + - name: Set up Docker Buildx |
| 64 | + uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 |
| 65 | + - name: GCloud Docker credential helper |
| 66 | + run: | |
| 67 | + gcloud auth configure-docker us.gcr.io |
| 68 | + - name: Build and Push Multi-Arch Image |
| 69 | + run: | |
| 70 | + docker buildx build \ |
| 71 | + --platform linux/amd64,linux/arm64 \ |
| 72 | + -t us.gcr.io/apache-beam-testing/python-postcommit-it/vllm:latest \ |
| 73 | + -f sdks/python/apache_beam/ml/inference/test_resources/vllm.dockerfile.old \ |
| 74 | + --push \ |
| 75 | + . |
0 commit comments