Skip to content

Commit 4edad04

Browse files
committed
fix: CI pipeline
Signed-off-by: Tomas Weiss <[email protected]>
1 parent 1bdff27 commit 4edad04

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

.github/workflows/build-agent.yaml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ name: Build and Push Agent Image
22

33
on:
44
push:
5-
branches:
6-
- main
7-
- feat/github-actions-example
5+
tags:
6+
- 'release-*'
87

98
jobs:
109
build:
@@ -40,7 +39,13 @@ jobs:
4039
- name: Set up Docker Buildx
4140
uses: docker/setup-buildx-action@v3
4241

42+
- name: Extract version from tag
43+
id: extract_version
44+
run: |
45+
# Extract version from tag (e.g., release-1.2.3 -> 1.2.3)
46+
VERSION=${GITHUB_REF#refs/tags/release-}
47+
echo "version=$VERSION" >> $GITHUB_OUTPUT
48+
4349
- name: Build and Push
4450
run: |
45-
beeai build ./ --tag ghcr.io/${{ github.repository }}/my-agent:latest --no-import --multi-platform
46-
docker push ghcr.io/${{ github.repository }}/my-agent:latest
51+
beeai build ./ --tag ghcr.io/${{ github.repository }}/my-agent:${{ steps.extract_version.outputs.version }} --no-import --multi-platform --push

0 commit comments

Comments
 (0)