Skip to content

Commit 3f0829d

Browse files
committed
[DOP-25355] Do not build ARM images on develop branch
1 parent a7e5f09 commit 3f0829d

File tree

3 files changed

+33
-9
lines changed

3 files changed

+33
-9
lines changed

.github/workflows/scheduler_docker_image.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,16 @@ jobs:
4343
echo "TAG=mtsrus/syncmaster-scheduler:latest,mtsrus/syncmaster-scheduler:${{ github.ref_name }}" >> $GITHUB_ENV
4444
fi
4545
46+
- name: Set platforms
47+
id: set_platforms
48+
run: |
49+
# Building krb5 on ARM is time consuming, do this only at release
50+
if [[ "${{ github.ref_type }}" == "branch" && "${{ github.ref_name }}" == "develop" ]]; then
51+
echo "PLATFORMS=linux/amd64" >> $GITHUB_ENV
52+
elif [[ "${{ github.ref_type }}" == "tag" ]]; then
53+
echo "PLATFORMS=linux/amd64,linux/arm64/v8" >> $GITHUB_ENV
54+
fi
55+
4656
- name: Build scheduler image
4757
uses: docker/build-push-action@v6
4858
with:
@@ -54,9 +64,7 @@ jobs:
5464
push: true
5565
cache-to: type=inline
5666
cache-from: mtsrus/syncmaster-scheduler:develop
57-
platforms: |
58-
linux/amd64
59-
linux/arm64/v8
67+
platforms: ${{ env.PLATFORMS }}
6068
provenance: mode=max
6169

6270
- name: Convert README to Markdown

.github/workflows/backend_docker_image.yml renamed to .github/workflows/server_docker_image.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,16 @@ jobs:
4343
echo "TAG=mtsrus/syncmaster-server:latest,mtsrus/syncmaster-server:${{ github.ref_name }}" >> $GITHUB_ENV
4444
fi
4545
46+
- name: Set platforms
47+
id: set_platforms
48+
run: |
49+
# Building krb5 on ARM is time consuming, do this only at release
50+
if [[ "${{ github.ref_type }}" == "branch" && "${{ github.ref_name }}" == "develop" ]]; then
51+
echo "PLATFORMS=linux/amd64" >> $GITHUB_ENV
52+
elif [[ "${{ github.ref_type }}" == "tag" ]]; then
53+
echo "PLATFORMS=linux/amd64,linux/arm64/v8" >> $GITHUB_ENV
54+
fi
55+
4656
- name: Build Server image
4757
uses: docker/build-push-action@v6
4858
with:
@@ -54,9 +64,7 @@ jobs:
5464
push: true
5565
cache-to: type=inline
5666
cache-from: mtsrus/syncmaster-server:develop
57-
platforms: |
58-
linux/amd64
59-
linux/arm64/v8
67+
platforms: ${{ env.PLATFORMS }}
6068
provenance: mode=max
6169

6270
- name: Convert README to Markdown

.github/workflows/worker_docker_image.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,16 @@ jobs:
4343
echo "TAG=mtsrus/syncmaster-worker:latest,mtsrus/syncmaster-worker:${{ github.ref_name }}" >> $GITHUB_ENV
4444
fi
4545
46+
- name: Set platforms
47+
id: set_platforms
48+
run: |
49+
# Building krb5 on ARM is time consuming, do this only at release
50+
if [[ "${{ github.ref_type }}" == "branch" && "${{ github.ref_name }}" == "develop" ]]; then
51+
echo "PLATFORMS=linux/amd64" >> $GITHUB_ENV
52+
elif [[ "${{ github.ref_type }}" == "tag" ]]; then
53+
echo "PLATFORMS=linux/amd64,linux/arm64/v8" >> $GITHUB_ENV
54+
fi
55+
4656
- name: Build worker image
4757
uses: docker/build-push-action@v6
4858
with:
@@ -54,9 +64,7 @@ jobs:
5464
push: true
5565
cache-to: type=inline
5666
cache-from: mtsrus/syncmaster-worker:develop
57-
platforms: |
58-
linux/amd64
59-
linux/arm64/v8
67+
platforms: ${{ env.PLATFORMS }}
6068
provenance: mode=max
6169

6270
- name: Convert README to Markdown

0 commit comments

Comments
 (0)