Skip to content

Commit 87a8bfd

Browse files
committed
fix: update prod build workflow
1 parent 9861a09 commit 87a8bfd

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

.github/workflows/prod-build.yml

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,13 @@
99

1010
name: Prod Build, Test and Publish
1111

12-
on:
13-
release:
14-
types: [published]
12+
# on:
13+
# release:
14+
# types: [published]
1515

16+
on:
17+
push:
18+
branches: [main]
1619

1720
# Set global environment variables
1821
env:
@@ -60,15 +63,6 @@ jobs:
6063
${{ env.REPOSITORY_NAMESPACE }}/${{ env.REPOSITORY_NAME }}:${{ steps.fetch-latest-release.outputs.tag_name }}
6164
${{ env.REPOSITORY_NAMESPACE }}/${{ env.REPOSITORY_NAME }}:latest
6265
63-
# Check if frontend files have changed to optimize build process
64-
- name: Check for frontend changes
65-
uses: dorny/paths-filter@v2
66-
id: frontend-changes
67-
with:
68-
filters: |
69-
frontend:
70-
- 'frontend/**'
71-
7266
# Build and push lite version of backend image
7367
- name: Build and push lite Docker image
7468
uses: docker/build-push-action@v4
@@ -82,9 +76,18 @@ jobs:
8276
${{ env.REPOSITORY_NAMESPACE }}/${{ env.REPOSITORY_NAME }}:${{ steps.fetch-latest-release.outputs.tag_name }}-lite
8377
${{ env.REPOSITORY_NAMESPACE }}/${{ env.REPOSITORY_NAME }}:latest-lite
8478
79+
# Check if frontend files have changed to optimize build process
80+
- name: Check for frontend changes
81+
uses: dorny/paths-filter@v2
82+
id: frontend-changes
83+
with:
84+
filters: |
85+
frontend:
86+
- 'frontend/**'
87+
8588
# Build frontend Docker image only if frontend files changed
8689
- name: Build and push frontend Docker image
87-
uses: docker/build-push-action@v4
90+
uses: docker/build-push-action@v5.3.0
8891
if: steps.frontend-changes.outputs.frontend == 'true'
8992
with:
9093
context: ./frontend

0 commit comments

Comments
 (0)