blob: 21b6dc8d53c8c57bf869d21c544c4acb6d2d5382 [file]
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
name: Publish Python VLLM Image
on:
schedule:
- cron: '0 0 * * 0' # Run weekly (Sunday at 00:00)
workflow_dispatch:
# Setting explicit permissions for the action to avoid the default permissions
permissions:
actions: write
pull-requests: read
checks: read
contents: read
deployments: read
id-token: none
issues: read
discussions: read
packages: read
pages: read
repository-projects: read
security-events: read
statuses: read
# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
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 }}'
cancel-in-progress: true
jobs:
build_and_push_image:
if: |
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'schedule' && github.repository == 'apache/beam')
runs-on: [self-hosted, ubuntu-24.04, main]
timeout-minutes: 60
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Authenticate on GCP
uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093
with:
service_account: ${{ secrets.GCP_SA_EMAIL }}
credentials_json: ${{ secrets.GCP_SA_KEY }}
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5
- name: GCloud Docker credential helper
run: |
gcloud auth configure-docker us.gcr.io
- name: Build and Push Multi-Arch Image
run: |
docker buildx build \
--platform linux/amd64,linux/arm64 \
-t us.gcr.io/apache-beam-testing/python-postcommit-it/vllm:latest \
-f sdks/python/apache_beam/ml/inference/test_resources/vllm.dockerfile.old \
--push \
.