Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Github Actions Caching #1419

Merged
merged 20 commits into from
Jun 15, 2021
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 40 additions & 10 deletions .github/workflows/docker-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
- develop
paths-ignore:
- 'docs/**'
pull_request:
paths-ignore:
- 'docs/**'
georgysavva marked this conversation as resolved.
Show resolved Hide resolved

jobs:

Expand All @@ -14,13 +17,40 @@ jobs:
env:
DOCKER_BUILDKIT: 1
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Publish to Docker Hub
uses: docker/build-push-action@92e71463491f2d026a477188b8ad3a0fdd9d672c
with:
repository: iotaledger/goshimmer
username: '${{ secrets.IOTALEDGER_HUB_DOCKER_LOGIN }}'
password: '${{ secrets.IOTALEDGER_HUB_DOCKER_PASSWORD }}'
tags: develop
- name: Checkout repository
uses: actions/checkout@v2.3.4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1.3.0

- name: Cache Docker layers
uses: actions/cache@v2.1.6
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-

- name: Login to DockerHub
uses: docker/login-action@v1.9.0
with:
username: '${{ secrets.IOTALEDGER_HUB_DOCKER_LOGIN }}'
password: '${{ secrets.IOTALEDGER_HUB_DOCKER_PASSWORD }}'

- name: Publish to Docker Hub
uses: docker/build-push-action@v2.5.0
with:
build-args: |
mount='id=go_build_cache_mount,type=bind,source=/tmp/foo'
georgysavva marked this conversation as resolved.
Show resolved Hide resolved
tags: iotaledger/goshimmer:develop
push: true
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-new

- # Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
7 changes: 0 additions & 7 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ jobs:
- name: Pull additional Docker images
run: |
docker pull angelocapossele/drand:v1.1.4
docker pull gaiaadm/pumba:0.7.2
docker pull gaiadocker/iproute2:latest

- name: Run integration tests
Expand Down Expand Up @@ -95,7 +94,6 @@ jobs:
- name: Pull additional Docker images
run: |
docker pull angelocapossele/drand:v1.1.4
docker pull gaiaadm/pumba:0.7.2
docker pull gaiadocker/iproute2:latest

- name: Run integration tests
Expand Down Expand Up @@ -130,7 +128,6 @@ jobs:
- name: Pull additional Docker images
run: |
docker pull angelocapossele/drand:v1.1.4
docker pull gaiaadm/pumba:0.7.2
docker pull gaiadocker/iproute2:latest

- name: Run integration tests
Expand Down Expand Up @@ -166,7 +163,6 @@ jobs:
- name: Pull additional Docker images
run: |
docker pull angelocapossele/drand:v1.1.4
docker pull gaiaadm/pumba:0.7.2
docker pull gaiadocker/iproute2:latest

- name: Run integration tests
Expand Down Expand Up @@ -202,7 +198,6 @@ jobs:
- name: Pull additional Docker images
run: |
docker pull angelocapossele/drand:v1.1.4
docker pull gaiaadm/pumba:0.7.2
docker pull gaiadocker/iproute2:latest

- name: Run integration tests
Expand Down Expand Up @@ -236,7 +231,6 @@ jobs:
- name: Pull additional Docker images
run: |
docker pull angelocapossele/drand:v1.1.4
docker pull gaiaadm/pumba:0.7.2
docker pull gaiadocker/iproute2:latest

- name: Run integration tests
Expand Down Expand Up @@ -270,7 +264,6 @@ jobs:
- name: Pull additional Docker images
run: |
docker pull angelocapossele/drand:1.1.3
docker pull gaiaadm/pumba:latest
docker pull gaiadocker/iproute2:latest

- name: Run integration tests
Expand Down