mirror of
https://github.com/langchain-ai/langsmith-collector-proxy.git
synced 2026-07-01 16:08:51 -04:00
f0cb99280a
* chore: implement semantic versioning * remove check-version step
66 lines
2.1 KiB
YAML
66 lines
2.1 KiB
YAML
name: Publish Collector Docker Images
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'VERSION'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
publish-collector:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Get version and validate
|
|
run: |
|
|
VERSION=$(cat VERSION)
|
|
if [[ ! $VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
|
echo "Error: VERSION must follow semantic versioning (x.y.z)"
|
|
exit 1
|
|
fi
|
|
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
|
echo "GIT_SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
|
echo "Building version: $VERSION"
|
|
|
|
- name: Login to DockerHub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ secrets.LANGCHAIN_DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.LANGCHAIN_DOCKERHUB_PASSWORD }}
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Build and push collector image
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
push: true
|
|
platforms: linux/amd64,linux/arm64
|
|
file: Dockerfile
|
|
build-args: |
|
|
VERSION=${{ env.VERSION }}
|
|
tags: |
|
|
docker.io/langchain/langsmith-collector-proxy:latest
|
|
docker.io/langchain/langsmith-collector-proxy:v${{ env.VERSION }}
|
|
docker.io/langchain/langsmith-collector-proxy:${{ env.GIT_SHORT_SHA }}
|
|
|
|
- name: Create GitHub Release
|
|
uses: actions/create-release@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
tag_name: v${{ env.VERSION }}
|
|
release_name: Release v${{ env.VERSION }}
|
|
body: |
|
|
## Changes in v${{ env.VERSION }}
|
|
|
|
Docker images published:
|
|
- `docker.io/langchain/langsmith-collector-proxy:v${{ env.VERSION }}`
|
|
- `docker.io/langchain/langsmith-collector-proxy:latest`
|
|
- `docker.io/langchain/langsmith-collector-proxy:${{ env.GIT_SHORT_SHA }}`
|
|
draft: false
|
|
prerelease: false
|