added ui build step

This commit is contained in:
Anshul Sharma 2025-04-26 23:10:10 +05:30
parent 73350c7f92
commit 6d4e5a740f

View file

@ -149,14 +149,16 @@ jobs:
id: meta id: meta
uses: docker/metadata-action@v5 uses: docker/metadata-action@v5
with: with:
images: ghcr.io/${{ github.repository_owner }}/surfsense_backend images: |
ghcr.io/${{ github.repository_owner }}/surfsense_backend
ghcr.io/${{ github.repository_owner }}/surfsense_ui
tags: | tags: |
# Use the tag generated in the previous job # Use the tag generated in the previous job
type=raw,value=${{ needs.tag_release.outputs.new_tag }} type=raw,value=${{ needs.tag_release.outputs.new_tag }}
# Optionally add 'latest' tag if building from the default branch # Optionally add 'latest' tag if building from the default branch
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) || github.event.inputs.branch == github.event.repository.default_branch }} type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) || github.event.inputs.branch == github.event.repository.default_branch }}
- name: Build and push Docker image - name: Build and push Backend Docker image
uses: docker/build-push-action@v5 uses: docker/build-push-action@v5
with: with:
context: ./surfsense_backend context: ./surfsense_backend
@ -166,3 +168,14 @@ jobs:
# Optional: Add build cache for faster builds # Optional: Add build cache for faster builds
cache-from: type=gha cache-from: type=gha
cache-to: type=gha,mode=max cache-to: type=gha,mode=max
- name: Build and push UI Docker image
uses: docker/build-push-action@v5
with:
context: ./surfsense_web
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# Optional: Add build cache for faster builds
cache-from: type=gha
cache-to: type=gha,mode=max