Skip to content

Commit d534b22

Browse files
committed
We know that sometimes FTL fails to build on GHA, it's usually transient. Implement retry logic from the FTL repo
remove redundant environment variable definitions. Signed-off-by: Adam Warner <[email protected]>
1 parent aca2bbd commit d534b22

2 files changed

Lines changed: 19 additions & 16 deletions

File tree

.github/workflows/ftl-build-publish.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,17 @@ jobs:
9090

9191
- name: Build and push by digest
9292
id: build
93-
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 #v6.18.0
93+
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 #v3.0.2
9494
with:
95-
context: ftl-build
96-
platforms: ${{ matrix.platform }}
97-
target: build
98-
labels: ${{ steps.meta.outputs.labels }}
99-
outputs: |
100-
type=image,name=${{ env.DOCKER_REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true
95+
max_attempts: 3
96+
timeout_minutes: 60
97+
command: |
98+
docker buildx build \
99+
--context ftl-build \
100+
--platform ${{ matrix.platform }} \
101+
--target build \
102+
--label "${{ steps.meta.outputs.labels }}" \
103+
--output "type=image,name=${{ env.DOCKER_REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true"
101104
102105
- name: Export digests
103106
run: |

.github/workflows/ftl-build-test.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ on:
66
permissions:
77
contents: read
88

9-
env:
10-
DOCKER_REGISTRY_IMAGE: ${{ secrets.DOCKERHUB_NAMESPACE }}/ftl-build
11-
GITHUB_REGISTRY_IMAGE: ghcr.io/${{ github.repository_owner }}/ftl-build
12-
139
jobs:
1410
build-and-test:
1511
runs-on: ${{ matrix.runner }}
@@ -42,9 +38,13 @@ jobs:
4238
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 #v3.11.1
4339

4440
- name: Build container and test-compile FTL
45-
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 #v6.18.0
41+
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 #v3.0.2
4642
with:
47-
context: ftl-build
48-
platforms: ${{ matrix.platform }}
49-
push: false
50-
target: test
43+
max_attempts: 3
44+
timeout_minutes: 60
45+
command: |
46+
docker buildx build \
47+
--platform ${{ matrix.platform }} \
48+
--target test \
49+
--output type=docker \
50+
ftl-build

0 commit comments

Comments
 (0)