diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b1ac42f22..79b6a04bd 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -14,7 +14,9 @@ on: - master jobs: docker-build: - runs-on: ubuntu-latest + runs-on: ubuntu-18.04 + strategy: + fail-fast: false env: IMAGE_FULL: quay.io/eclipse/che-dashboard:next CACHE_IMAGE_FULL: docker.io/cheincubator/che-dashboard:cache @@ -22,16 +24,20 @@ jobs: - uses: actions/checkout@v2 name: Checkout che-dashboard source code - name: Docker Buildx - uses: crazy-max/ghaction-docker-buildx@v1.4.0 + uses: crazy-max/ghaction-docker-buildx@v1.6.2 with: - version: v0.3.1 + buildx-version: v0.4.1 - name: "Docker prepare" run: docker image prune -a -f - name: "Docker Quay.io Login" run: docker login -u "${{ secrets.QUAY_USERNAME }}" -p "${{ secrets.QUAY_PASSWORD }}" quay.io - name: "Docker docker.io Login" run: docker login -u "${{ secrets.DOCKERHUB_USERNAME }}" -p "${{ secrets.DOCKERHUB_PASSWORD }}" docker.io - - name: "Docker build" - run: docker buildx build --platform linux/amd64 --cache-from="type=registry,ref=${CACHE_IMAGE_FULL}" --cache-to="type=registry,ref=${CACHE_IMAGE_FULL},mode=max" -t ${IMAGE_FULL} -f apache.Dockerfile --push . + - name: "Docker build with cache" + uses: nick-invision/retry@v1 + with: + timeout_minutes: 20 + max_attempts: 5 + command: docker buildx build --platform linux/amd64,linux/s390x --cache-from="type=registry,ref=${CACHE_IMAGE_FULL}" --cache-to="type=registry,ref=${CACHE_IMAGE_FULL},mode=max" -t ${IMAGE_FULL} -f apache.Dockerfile --push . - name: "Docker Logout" run: docker logout diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 812d06bf5..25d66d753 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -14,7 +14,9 @@ on: branches: [ master ] jobs: docker-build: - runs-on: ubuntu-latest + runs-on: ubuntu-18.04 + strategy: + fail-fast: false env: IMAGE_FULL: quay.io/eclipse/che-dashboard:next CACHE_IMAGE_FULL: docker.io/cheincubator/che-dashboard:cache @@ -22,10 +24,14 @@ jobs: - uses: actions/checkout@v2 name: Checkout che-dashboard source code - name: Docker Buildx - uses: crazy-max/ghaction-docker-buildx@v1.4.0 + uses: crazy-max/ghaction-docker-buildx@v1.6.2 with: - version: v0.3.1 + buildx-version: v0.4.1 - name: "Docker prepare" run: docker image prune -a -f - - name: "Docker build" - run: docker buildx build --platform linux/amd64 -t ${IMAGE_FULL} -f apache.Dockerfile . + - name: "Docker build with cache" + uses: nick-invision/retry@v1 + with: + timeout_minutes: 100 + max_attempts: 5 + command: docker buildx build --platform linux/amd64 --cache-from="type=registry,ref=${CACHE_IMAGE_FULL}" -t ${IMAGE_FULL} -f apache.Dockerfile .