Skip to content

Commit 1d51cd4

Browse files
committed
Fix the GH workflow to push the docker image
1 parent ad51a1c commit 1d51cd4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/docker-image.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,23 @@ on:
44
push:
55
tags:
66
- 'v*' # This will match any tag that starts with 'v'
7-
7+
pull_request: # Add this to run on PRs
8+
branches:
9+
- main # Assuming your default branch is 'main'
810
jobs:
911
build:
1012
runs-on: ubuntu-latest
1113

1214
steps:
1315
- uses: actions/checkout@v3
16+
with:
17+
submodules: recursive
1418
- uses: docker/setup-qemu-action@v3
1519
- uses: docker/setup-buildx-action@v3
1620
- uses: docker/build-push-action@v5
1721
with:
1822
context: .
19-
tags: ghcr.io/hasura/ndc-calcite:${{ github.ref_name }} # Use the tag name for the Docker image
23+
tags: ghcr.io/hasura/ndc-calcite:${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || github.ref_name }}
2024
platforms: linux/amd64,linux/arm64
2125
cache-from: type=gha
2226
cache-to: type=gha,mode=max

0 commit comments

Comments
 (0)