Skip to content

Commit 479b596

Browse files
devin-ai-integration[bot]Jayant Krishnamurthy
andauthored
ci: add docker builds for PRs that modify relevant files (#2352)
* ci: add docker builds for PRs that modify relevant files Co-Authored-By: Jayant Krishnamurthy <[email protected]> * refactor: rename workflow files from push-xxx-image to docker-xxx Co-Authored-By: Jayant Krishnamurthy <[email protected]> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Jayant Krishnamurthy <[email protected]>
1 parent 07f289d commit 479b596

File tree

4 files changed

+20
-4
lines changed

4 files changed

+20
-4
lines changed

.github/workflows/push-fortuna-image.yml renamed to .github/workflows/docker-fortuna.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ on:
33
push:
44
tags:
55
- fortuna-v*
6+
pull_request:
7+
paths:
8+
- "apps/fortuna/**"
69
workflow_dispatch:
710
inputs:
811
dispatch_description:
@@ -47,6 +50,6 @@ jobs:
4750
with:
4851
context: .
4952
file: "./apps/fortuna/Dockerfile"
50-
push: true
53+
push: ${{ github.event_name != 'pull_request' }}
5154
tags: ${{ steps.metadata_fortuna.outputs.tags }}
5255
labels: ${{ steps.metadata_fortuna.outputs.labels }}

.github/workflows/push-hermes-image.yml renamed to .github/workflows/docker-hermes.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ on:
33
push:
44
tags:
55
- hermes-v*
6+
pull_request:
7+
paths:
8+
- "apps/hermes/server/**"
69
workflow_dispatch:
710
inputs:
811
dispatch_description:
@@ -38,7 +41,9 @@ jobs:
3841
AWS_REGION: us-east-1
3942
- run: |
4043
DOCKER_BUILDKIT=1 docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -f apps/hermes/server/Dockerfile .
41-
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
44+
if [[ "${{ github.event_name }}" != "pull_request" ]]; then
45+
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
46+
fi
4247
env:
4348
ECR_REGISTRY: public.ecr.aws
4449
ECR_REPOSITORY: pyth-network/hermes

.github/workflows/push-price-pusher-image.yml renamed to .github/workflows/docker-price-pusher.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ on:
33
push:
44
tags:
55
- pyth-price-pusher-v*
6+
pull_request:
7+
paths:
8+
- "apps/price_pusher/**"
9+
- "Dockerfile.node"
610
workflow_dispatch:
711
inputs:
812
dispatch_description:
@@ -40,7 +44,9 @@ jobs:
4044
id: ecr_login
4145
- run: |
4246
DOCKER_BUILDKIT=1 docker build --build-arg package="@pythnetwork/price-pusher" -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -f Dockerfile.node .
43-
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
47+
if [[ "${{ github.event_name }}" != "pull_request" ]]; then
48+
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
49+
fi
4450
env:
4551
ECR_REGISTRY: public.ecr.aws
4652
ECR_REPOSITORY: pyth-network/xc-price-pusher

.github/workflows/push-xc-admin-frontend-image.yml renamed to .github/workflows/docker-xc-admin-frontend.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ name: xc_admin_frontend Docker Image
22
on:
33
push:
44
branches: [main]
5-
paths: [governance/xc_admin/**]
5+
paths: ["governance/xc_admin/**"]
6+
pull_request:
7+
paths: ["governance/xc_admin/**"]
68
permissions:
79
contents: read
810
id-token: write

0 commit comments

Comments
 (0)