Skip to content

Commit 6308f1d

Browse files
authored
Fix docker image building for PR commits (#907)
1 parent 4ed5cda commit 6308f1d

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

.github/workflows/complete.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,20 @@ jobs:
88
strategy:
99
matrix:
1010
component: [core, serving]
11+
env:
12+
GITHUB_PR_SHA: ${{ github.event.pull_request.head.sha }}
13+
REGISTRY: gcr.io/kf-feast
1114
steps:
1215
- uses: actions/checkout@v2
1316
- name: build image
14-
run: make build-${{ matrix.component }}-docker REGISTRY=gcr.io/kf-feast VERSION=${GITHUB_SHA}
17+
run: make build-${{ matrix.component }}-docker REGISTRY=${REGISTRY} VERSION=${GITHUB_SHA}
1518
- name: push image
16-
run: make push-${{ matrix.component }}-docker REGISTRY=gcr.io/kf-feast VERSION=${GITHUB_SHA}
19+
run: |
20+
docker push ${REGISTRY}/feast-${{ matrix.component }}:${GITHUB_SHA}
21+
if [ -n "${GITHUB_PR_SHA}" ]; then
22+
docker tag ${REGISTRY}/feast-${{ matrix.component }}:${GITHUB_SHA} gcr.io/kf-feast/feast-${{ matrix.component }}:${GITHUB_PR_SHA}
23+
docker push ${REGISTRY}/feast-${{ matrix.component }}:${GITHUB_PR_SHA}
24+
fi
1725
1826
lint-java:
1927
container: gcr.io/kf-feast/feast-ci:latest

0 commit comments

Comments
 (0)