diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2021-10-16 17:10:30 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2021-10-16 17:18:30 +0300 |
commit | 911cdbeab59c384fd0d6a4a1773e9f5a2effa1dc (patch) | |
tree | c719d443b833b5df9b7b281940fb81af8adf4541 /.github/workflows/ci.yml | |
parent | add Gitlab support (diff) | |
download | cgitize-911cdbeab59c384fd0d6a4a1773e9f5a2effa1dc.tar.gz cgitize-911cdbeab59c384fd0d6a4a1773e9f5a2effa1dc.zip |
workflows/ci: don't build containers for ARM on every commit
Diffstat (limited to '.github/workflows/ci.yml')
-rw-r--r-- | .github/workflows/ci.yml | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7416e5b..8003b13 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -87,10 +87,19 @@ jobs: with: username: '${{ secrets.DOCKERHUB_USERNAME }}' password: '${{ secrets.DOCKERHUB_TOKEN }}' + - id: platforms + name: Which platforms? + # Building for ARM for every commit in master is too time-consuming. + run: | + if [ '${{ github.ref }}' = 'refs/heads/master' ]; then + echo '::set-output name=platforms::linux/amd64' + else + echo '::set-output name=platforms::linux/amd64,linux-armhf' + fi - name: Build and publish uses: docker/build-push-action@v2 with: - platforms: linux/amd64,linux/armhf + platforms: '${{ steps.platforms.outputs.platforms }}' push: true tags: '${{ steps.meta.outputs.tags }}' labels: '${{ steps.meta.outputs.labels }}' |