File tree Expand file tree Collapse file tree 3 files changed +33
-9
lines changed
Expand file tree Collapse file tree 3 files changed +33
-9
lines changed Original file line number Diff line number Diff line change 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 :
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
Original file line number Diff line number Diff line change 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 :
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
Original file line number Diff line number Diff line change 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 :
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
You can’t perform that action at this time.
0 commit comments