11---
2- name : Build & Push
2+ name : Backend Build & Push
33
44# Migrated from GitLab CI - supports manual dispatch
55" on " :
@@ -11,53 +11,6 @@ permissions:
1111 packages : write
1212
1313jobs :
14- # Build and push frontend container - migrated from build-container-ui
15- build-and-push-frontend :
16- runs-on : ubuntu-latest
17- permissions :
18- contents : read
19- packages : write
20- steps :
21- - uses : actions/checkout@v4
22-
23- - name : Set version
24- id : version
25- run : |
26- if [ "${{ github.ref_type }}" == "tag" ]; then
27- echo "VERSION=${{ github.ref_name }}" >> $GITHUB_ENV
28- else
29- echo "VERSION=${{ github.sha }}" >> $GITHUB_ENV
30- fi
31- echo "SHORT_SHA=${GITHUB_SHA:0:8}" >> $GITHUB_ENV
32- # Set image name for frontend
33- RAG_EVAL_UI_IMAGE="ghcr.io/${{ github.repository }}/rag-eval-ui"
34- echo "RAG_EVAL_UI_IMAGE=${RAG_EVAL_UI_IMAGE}" >> $GITHUB_ENV
35-
36- - uses : docker/setup-buildx-action@v3
37-
38- - name : Login to GitHub Container Registry
39- uses : docker/login-action@v3
40- with :
41- registry : ghcr.io
42- username : ${{ github.actor }}
43- password : ${{ secrets.GITHUB_TOKEN }}
44-
45- - name : Build and push frontend container
46- uses : docker/build-push-action@v6
47- with :
48- context : frontend/
49- file : frontend/Dockerfile
50- build-args : |
51- VERSION=${{ env.VERSION }}
52- push : ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
53- tags : |
54- ${{ env.RAG_EVAL_UI_IMAGE }}:${{ env.SHORT_SHA }}
55- ${{ github.ref_type == 'tag' &&
56- format('{0}:{1}', env.RAG_EVAL_UI_IMAGE,
57- github.ref_name) || '' }}
58- cache-from : type=gha
59- cache-to : type=gha,mode=max
60-
6114 # Build and push backend container - migrated from build-container-backend
6215 build-and-push-backend :
6316 runs-on : ubuntu-latest
0 commit comments