diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index ce44074d..29e98a54 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -19,11 +19,6 @@ jobs: with: fetch-depth: 0 - - name: set up make - run: | - sudo apt-get update - sudo apt-get install make - - name: Run GoReleaser run: | make build-all @@ -65,6 +60,11 @@ jobs: echo "HEIGHLINER_FN=heighliner/${{ matrix.runner.platform }}.tar" | tr '/' '-' | tee -a $GITHUB_ENV echo "VERSION=$(git describe --tags | sed 's/^v//')" | tee -a $GITHUB_ENV + - uses: int128/docker-build-cache-config-action@v1 + id: cache + with: + image: ghcr.io/${{ github.repository }}/cache + - name: Build Docker Image id: build-docker uses: docker/build-push-action@v5 @@ -77,6 +77,8 @@ jobs: platforms: ${{ matrix.runner.platform }} push: false target: release + cache-from: ${{ steps.cache.outputs.cache-from }} + cache-to: ${{ steps.cache.outputs.cache-to }} outputs: type=docker,name=xion:${{ env.PLATFORM }},name-canonical=true - name: Build Heighliner Image diff --git a/Makefile b/Makefile index 1a88834e..24f7f28c 100644 --- a/Makefile +++ b/Makefile @@ -91,7 +91,7 @@ else go build -mod=readonly $(BUILD_FLAGS) -o build/xiond ./cmd/xiond endif -build-all: go.sum +build-all: $(DOCKER) run --rm \ --platform linux/amd64 \ --volume $(CURDIR):/root/go/src/github.com/burnt-network/xion \