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 4 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
48 changes: 38 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,38 @@ 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/[email protected]

- name: Set up Docker Buildx
uses: docker/[email protected]

- name: Cache Docker layers
uses: actions/[email protected]
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-

- name: Login to DockerHub
uses: docker/[email protected]
with:
username: '${{ secrets.IOTALEDGER_HUB_DOCKER_LOGIN }}'
password: '${{ secrets.IOTALEDGER_HUB_DOCKER_PASSWORD }}'

- name: Publish to Docker Hub
uses: docker/[email protected]
with:
tags: iotaledger/goshimmer:develop
push: true
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,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
1 change: 1 addition & 0 deletions plugins/gossip/gossip.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ func start(shutdownSignal <-chan struct{}) {
// resolve the bind address
address := net.JoinHostPort(config.Node().String(local.CfgBind), strconv.Itoa(gossipEndpoint.Port()))
localAddr, err := net.ResolveTCPAddr(gossipEndpoint.Network(), address)

georgysavva marked this conversation as resolved.
Show resolved Hide resolved
if err != nil {
log.Fatalf("Error resolving %s: %v", local.CfgBind, err)
}
Expand Down