Skip to content

Commit b26bb36

Browse files
darthkalidannysteinbrecher
andauthored
fix: update frontend image naming and streamline version tagging (#52)
Co-authored-by: dannysteinbrecher <[email protected]>
1 parent e9ac686 commit b26bb36

File tree

2 files changed

+10
-15
lines changed

2 files changed

+10
-15
lines changed

.github/workflows/frontend-build-and-push.yaml

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,12 @@ jobs:
4444
run: |
4545
echo "SHORT_SHA=${GITHUB_SHA:0:8}" >> $GITHUB_ENV
4646
# Set image name for frontend
47-
RAG_EVAL_UI_IMAGE="ghcr.io/${{ github.repository }}/rag-eval-ui"
48-
echo "RAG_EVAL_UI_IMAGE=${RAG_EVAL_UI_IMAGE}" >> $GITHUB_ENV
47+
FRONTEND_IMAGE="ghcr.io/${{ github.repository }}/frontend"
48+
echo "FRONTEND_IMAGE=${FRONTEND_IMAGE}" >> $GITHUB_ENV
4949
5050
# Set initial version for build
51-
if [ "${{ github.ref_type }}" == "tag" ]; then
52-
echo "VERSION=${{ github.ref_name }}" >> $GITHUB_ENV
53-
else
54-
echo "VERSION=${{ github.sha }}" >> $GITHUB_ENV
55-
fi
51+
echo "VERSION=${{ github.sha }}" >> $GITHUB_ENV
52+
5653
5754
- uses: docker/setup-buildx-action@v3
5855

@@ -72,10 +69,7 @@ jobs:
7269
VERSION=${{ env.VERSION }}
7370
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
7471
tags: |
75-
${{ env.RAG_EVAL_UI_IMAGE }}:${{ env.SHORT_SHA }}
76-
${{ github.ref_type == 'tag' &&
77-
format('{0}:{1}', env.RAG_EVAL_UI_IMAGE,
78-
github.ref_name) || '' }}
72+
${{ env.FRONTEND_IMAGE }}:${{ env.SHORT_SHA }}
7973
cache-from: type=gha
8074
cache-to: type=gha,mode=max
8175

@@ -96,6 +90,7 @@ jobs:
9690
cd frontend
9791
# Get the version from package.json after semantic-release
9892
NEW_VERSION=$(node -p "require('./package.json').version")
93+
9994
if [ -n "$NEW_VERSION" ] && [ "$NEW_VERSION" != "null" ]; then
10095
echo "Semantic release created version: $NEW_VERSION"
10196
# Create frontend-prefixed version tag
@@ -107,9 +102,9 @@ jobs:
107102
git push origin "$FRONTEND_VERSION"
108103
109104
# Tag the existing image with the frontend-prefixed semantic version
110-
docker pull ${{ env.RAG_EVAL_UI_IMAGE }}:${{ env.SHORT_SHA }}
111-
docker tag ${{ env.RAG_EVAL_UI_IMAGE }}:${{ env.SHORT_SHA }} ${{ env.RAG_EVAL_UI_IMAGE }}:$FRONTEND_VERSION
112-
docker push ${{ env.RAG_EVAL_UI_IMAGE }}:$FRONTEND_VERSION
105+
docker pull ${{ env.FRONTEND_IMAGE }}:${{ env.SHORT_SHA }}
106+
docker tag ${{ env.FRONTEND_IMAGE }}:${{ env.SHORT_SHA }} ${{ env.FRONTEND_IMAGE }}:$FRONTEND_VERSION
107+
docker push ${{ env.FRONTEND_IMAGE }}:$FRONTEND_VERSION
113108
echo "Tagged and pushed image with frontend version: $FRONTEND_VERSION"
114109
else
115110
echo "No new version was created by semantic-release"

frontend/.releaserc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"assets": [
1717
{
1818
"path": "CHANGELOG.md",
19-
"label": "Changelog-Test"
19+
"label": "Changelog"
2020
}
2121
]
2222
}

0 commit comments

Comments
 (0)