mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-13 23:11:40 +00:00
Merge remote-tracking branch 'origin/litellm_pr-label-ecr-artifact-workflow' into litellm_ui_test_ignore
merge parent
This commit is contained in:
commit
59b8bd7678
1 changed files with 16 additions and 14 deletions
30
.github/workflows/pr-label-build-artifact.yml
vendored
30
.github/workflows/pr-label-build-artifact.yml
vendored
|
|
@ -1,4 +1,4 @@
|
|||
name: PR Build Artifact ECR Connectivity
|
||||
name: PR Build Artifact
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
|
@ -11,8 +11,8 @@ permissions:
|
|||
pull-requests: read
|
||||
|
||||
jobs:
|
||||
push-hello-world-image:
|
||||
name: Push hello-world image to ECR
|
||||
build-and-push-image:
|
||||
name: Build and push LiteLLM PR artifact
|
||||
runs-on: ubuntu-latest
|
||||
if: >
|
||||
github.event.action == 'labeled' &&
|
||||
|
|
@ -29,6 +29,12 @@ jobs:
|
|||
test -n "${AWS_ROLE_TO_ASSUME}" || { echo "Missing repository variable: AWS_ROLE_TO_ASSUME"; exit 1; }
|
||||
test -n "${ECR_REPOSITORY}" || { echo "Missing repository variable: ECR_REPOSITORY"; exit 1; }
|
||||
|
||||
- name: Checkout PR head
|
||||
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
persist-credentials: false
|
||||
|
||||
- name: Configure AWS credentials
|
||||
uses: aws-actions/configure-aws-credentials@v4
|
||||
with:
|
||||
|
|
@ -57,25 +63,21 @@ jobs:
|
|||
echo "trace_tag=${trace_tag}"
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Create hello-world Dockerfile
|
||||
run: |
|
||||
cat > /tmp/Dockerfile.hello-world <<'EOF'
|
||||
FROM public.ecr.aws/docker/library/alpine:3.20
|
||||
CMD ["echo", "hello from litellm PR artifact workflow"]
|
||||
EOF
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12
|
||||
|
||||
- name: Build and push hello-world image
|
||||
- name: Build and push LiteLLM database image
|
||||
uses: docker/build-push-action@0adf9959216b96bec444f325f1e493d4aa344497 # v6.14
|
||||
with:
|
||||
context: /tmp
|
||||
file: /tmp/Dockerfile.hello-world
|
||||
context: .
|
||||
file: ./docker/Dockerfile.database
|
||||
push: true
|
||||
provenance: false
|
||||
tags: |
|
||||
${{ steps.image-tags.outputs.image_uri }}
|
||||
${{ steps.image-tags.outputs.trace_uri }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
|
||||
- name: Write workflow summary
|
||||
env:
|
||||
|
|
@ -86,7 +88,7 @@ jobs:
|
|||
TRACE_URI: ${{ steps.image-tags.outputs.trace_uri }}
|
||||
run: |
|
||||
{
|
||||
echo "### ECR connectivity test passed"
|
||||
echo "### PR build artifact pushed"
|
||||
echo
|
||||
echo "- PR: \`#${PR_NUMBER}\`"
|
||||
echo "- Head ref: \`${PR_HEAD_REF}\`"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue