Skip to content

Commit

Permalink
chore: Update test-build-docker-image.yml to trigger the build on pg …
Browse files Browse the repository at this point in the history
…branch (#36135)

## Description
## Summary by CodeRabbit

- **New Features**
- Expanded GitHub Actions workflow to trigger on both `master` and `pg`
branches.
	- Introduced a new job for managing server artifacts.

- **Improvements**
	- Enhanced workflow responsiveness to changes in multiple branches.
- Updated Docker image tagging to dynamically include branch names for
better versioning.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
abhvsn committed Sep 6, 2024
1 parent c47de98 commit 58b07dd
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/test-build-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ on:
type: string
default: latest

# trigger for pushes to master
# trigger for pushes to master and pg
push:
branches: [master]
branches: [master, pg]
paths:
- "app/client/**"
- "app/server/**"
Expand Down Expand Up @@ -100,7 +100,7 @@ jobs:
ci-test:
needs: [setup, build-docker-image]
# Only run if the build step is successful
if: success() && ( github.event_name != 'push' || github.ref == 'refs/heads/master' )
if: success() && ( github.event_name != 'push' || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/pg' )
name: ci-test
uses: ./.github/workflows/ci-test-custom-script.yml
secrets: inherit
Expand All @@ -113,7 +113,7 @@ jobs:
server-unit-tests:
name: server-unit-tests
needs: [build-docker-image]
if: success() && ( github.event_name != 'push' || github.ref == 'refs/heads/master' )
if: success() && ( github.event_name != 'push' || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/pg' )
uses: ./.github/workflows/server-build.yml
secrets: inherit
with:
Expand All @@ -123,7 +123,7 @@ jobs:
client-unit-tests:
name: client-unit-tests
needs: [build-docker-image]
if: success() && ( github.event_name != 'push' || github.ref == 'refs/heads/master' )
if: success() && ( github.event_name != 'push' || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/pg' )
uses: ./.github/workflows/client-unit-tests.yml
secrets: inherit
with:
Expand Down Expand Up @@ -341,6 +341,12 @@ jobs:
scripts/generate_info_json.sh
fi
- name: Place server artifacts-es
run: |
if [[ -f scripts/prepare_server_artifacts.sh ]]; then
scripts/prepare_server_artifacts.sh
fi
- name: Set up Depot CLI
uses: depot/setup-action@v1

Expand All @@ -362,7 +368,7 @@ jobs:
APPSMITH_CLOUD_SERVICES_BASE_URL=https://release-cs.appsmith.com
BASE=${{ vars.DOCKER_HUB_ORGANIZATION }}/base-${{ vars.EDITION }}:release
tags: |
${{ vars.DOCKER_HUB_ORGANIZATION }}/appsmith-${{ vars.EDITION }}:release
${{ vars.DOCKER_HUB_ORGANIZATION }}/appsmith-${{ vars.EDITION }}:${{ github.ref_name }}
package-master:
needs: [ci-test, client-unit-tests, server-unit-tests]
Expand Down

0 comments on commit 58b07dd

Please sign in to comment.