|
1 | | -name: Create and publish Docker image for extproc |
| 1 | +name: Create and publish Docker images |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | workflow_dispatch: |
|
18 | 18 | branches: [ "main" ] |
19 | 19 |
|
20 | 20 | jobs: |
21 | | - build_and_push: |
| 21 | + build_and_push_extproc: |
22 | 22 | runs-on: ubuntu-latest |
23 | 23 | permissions: |
24 | 24 | contents: read |
|
43 | 43 | - name: Set lowercase repository owner |
44 | 44 | run: echo "REPOSITORY_OWNER_LOWER=$(echo $GITHUB_REPOSITORY_OWNER | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV |
45 | 45 |
|
46 | | - - name: Build and push Docker image |
| 46 | + - name: Build and push extproc Docker image |
47 | 47 | uses: docker/build-push-action@v5 |
48 | 48 | with: |
49 | 49 | context: . |
|
52 | 52 | tags: | |
53 | 53 | ${{ inputs.is_nightly == true && format('ghcr.io/{0}/semantic-router/extproc:nightly-{1}', env.REPOSITORY_OWNER_LOWER, steps.date.outputs.date_tag) || format('ghcr.io/{0}/semantic-router/extproc:{1}', env.REPOSITORY_OWNER_LOWER, github.sha) }} |
54 | 54 | ${{ inputs.is_nightly != true && format('ghcr.io/{0}/semantic-router/extproc:latest', env.REPOSITORY_OWNER_LOWER) || '' }} |
| 55 | +
|
| 56 | + build_and_push_llm_katan: |
| 57 | + runs-on: ubuntu-latest |
| 58 | + permissions: |
| 59 | + contents: read |
| 60 | + packages: write |
| 61 | + |
| 62 | + steps: |
| 63 | + - name: Check out the repo |
| 64 | + uses: actions/checkout@v4 |
| 65 | + |
| 66 | + - name: Log in to GitHub Container Registry |
| 67 | + uses: docker/login-action@v3 |
| 68 | + with: |
| 69 | + registry: ghcr.io |
| 70 | + username: ${{ github.actor }} |
| 71 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 72 | + |
| 73 | + - name: Generate date tag for nightly builds |
| 74 | + id: date |
| 75 | + if: inputs.is_nightly == true |
| 76 | + run: echo "date_tag=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT |
| 77 | + |
| 78 | + - name: Set lowercase repository owner |
| 79 | + run: echo "REPOSITORY_OWNER_LOWER=$(echo $GITHUB_REPOSITORY_OWNER | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV |
| 80 | + |
| 81 | + - name: Extract version from pyproject.toml |
| 82 | + id: version |
| 83 | + run: | |
| 84 | + VERSION=$(grep '^version = ' e2e-tests/llm-katan/pyproject.toml | sed 's/version = "\(.*\)"/\1/') |
| 85 | + echo "version=$VERSION" >> $GITHUB_OUTPUT |
| 86 | +
|
| 87 | + - name: Build and push llm-katan Docker image |
| 88 | + uses: docker/build-push-action@v5 |
| 89 | + with: |
| 90 | + context: ./e2e-tests/llm-katan |
| 91 | + file: ./e2e-tests/llm-katan/Dockerfile |
| 92 | + push: ${{ github.event_name != 'pull_request' }} # Only push on merge to main, not on PRs |
| 93 | + tags: | |
| 94 | + ${{ inputs.is_nightly == true && format('ghcr.io/{0}/semantic-router/llm-katan:nightly-{1}', env.REPOSITORY_OWNER_LOWER, steps.date.outputs.date_tag) || format('ghcr.io/{0}/semantic-router/llm-katan:{1}', env.REPOSITORY_OWNER_LOWER, github.sha) }} |
| 95 | + ${{ inputs.is_nightly != true && format('ghcr.io/{0}/semantic-router/llm-katan:latest', env.REPOSITORY_OWNER_LOWER) || '' }} |
| 96 | + ${{ inputs.is_nightly != true && format('ghcr.io/{0}/semantic-router/llm-katan:v{1}', env.REPOSITORY_OWNER_LOWER, steps.version.outputs.version) || '' }} |
0 commit comments