Skip to content

Commit

Permalink
Upgrade of buildx (#44)
Browse files Browse the repository at this point in the history
* Upgrade crazy-max/ghaction-docker-buildx
* set concrete version of running environment ubuntu-18.04
* set concrete version of buildx-version: v0.4.1
* added 5 retries to build and test

Signed-off-by: Sergii Kabashniuk <[email protected]>
  • Loading branch information
skabashnyuk authored May 22, 2020
1 parent 048e50b commit e058663
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 10 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,30 @@ 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
steps:
- 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
16 changes: 11 additions & 5 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,24 @@ 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
steps:
- 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 .

0 comments on commit e058663

Please sign in to comment.