Skip to content

Commit c292e84

Browse files
authored
perf: quickly build a Docker image for every branch (#773)
* perf: cache Docker image layers * chore: temporary add branch to test * perf: separate AMD and ARM builds for gentropy * perf: temporarily test only VEP image separately * perf: test ARM/AMD gentropy/VEP separately * perf: introduce quick build for all commits * perf: quick build for all tags * fix: use correct syntax for tags * fix: revert accidental changes for the VEP step
1 parent c3651b7 commit c292e84

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

.github/workflows/artifact.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name: Build and Push to Artifact Registry
22

33
"on":
44
push:
5-
branches: ["dev"]
6-
tags: ["v*"]
5+
branches: ["*"]
6+
tags: ["*"]
77

88
env:
99
PROJECT_ID: open-targets-genetics-dev
@@ -39,7 +39,18 @@ jobs:
3939
run: |-
4040
gcloud auth configure-docker ${{ env.REGION }}-docker.pkg.dev --quiet
4141
42+
- name: Quick Docker build (gentropy only, AMD64 only, with layer cache)
43+
uses: docker/build-push-action@v6
44+
with:
45+
platforms: linux/amd64
46+
push: true
47+
tags: "${{ env.GAR_LOCATION }}/${{ env.REPOSITORY }}/gentropy:${{ github.ref_name }}"
48+
context: .
49+
cache-from: type=gha
50+
cache-to: type=gha,mode=max
51+
4252
- name: Build and push gentropy image
53+
if: github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/v')
4354
uses: docker/build-push-action@v6
4455
with:
4556
platforms: linux/amd64,linux/arm64
@@ -48,6 +59,7 @@ jobs:
4859
context: .
4960

5061
- name: Build and push VEP image
62+
if: github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/v')
5163
uses: docker/build-push-action@v6
5264
with:
5365
platforms: linux/amd64

0 commit comments

Comments
 (0)