generated from flashbots/go-template
-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: use the same COPY for go.mod and go.sum * chore: update docker actions to latest versions * build: optimize Go build process with caching * test: trigger build on PR to test * test: dummy change on go code to test cache * test: run go mod -u=patch to measure how docker holds * Revert "test: dummy change on go codeto confirm that cache still works" * Revert "test: run go mod -u=patch to measure how docker holds" This reverts commit 92df7a5. * Revert "test: trigger build on PR to test" This reverts commit 0d0d452.
- Loading branch information
1 parent
c52858a
commit c9d96e1
Showing
2 changed files
with
19 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,14 +24,14 @@ jobs: | |
echo ${{ env.RELEASE_VERSION }} | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: flashbots/mev-boost-relay | ||
tags: | | ||
|
@@ -41,13 +41,24 @@ jobs: | |
type=raw,value=latest,enable=${{ !contains(env.RELEASE_VERSION, '-') }} | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v2 | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Go Build Cache for Docker | ||
uses: actions/cache@v3 | ||
with: | ||
path: go-build-cache | ||
key: ${{ runner.os }}-go-build-cache-${{ hashFiles('**/go.sum') }} | ||
|
||
- name: inject go-build-cache into docker | ||
uses: reproducible-containers/[email protected] | ||
with: | ||
cache-source: go-build-cache | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v3 | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
push: true | ||
|
@@ -56,6 +67,8 @@ jobs: | |
platforms: linux/amd64,linux/arm64 | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
|
||
github-release: | ||
runs-on: ubuntu-latest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters