mirror of
https://github.com/GoogleContainerTools/kaniko
synced 2026-10-21 10:53:22 +02:00
Share the Go build cache when building in Dockerfiles (#1853)
On my machine this makes image rebuilds go from ~5m to 1.5s. This also required setting DOCKER_BUILDKIT=1 in integration test image builds. I also took the opportunity to bump the Go version used in those tests to Go 1.17 to match the image build processes, and tidied up the workflow files a bit too (renaming for consistency, typos, whitespace, etc.)
This commit is contained in:
@@ -1,30 +1,20 @@
|
||||
name: Unit tests
|
||||
|
||||
# Triggers the workflow on push or pull request events
|
||||
on: [pull_request]
|
||||
on:
|
||||
pull_request:
|
||||
branches: ['master']
|
||||
|
||||
concurrency:
|
||||
group: unit-tests-${{ github.head_ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build-executor:
|
||||
env:
|
||||
IMAGE_REPO: 'localhost:5000'
|
||||
REGISTRY: 'localhost:5000'
|
||||
tests:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.14
|
||||
id: go
|
||||
- uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.17
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Run unit-test
|
||||
run:
|
||||
make test
|
||||
- run: make test
|
||||
|
||||
Reference in New Issue
Block a user