ci: caches, prebuilt linters, image from the built binaries
ci / lint (push) Skipped
ci / test (push) Skipped
ci / build (push) Skipped
ci / image (push) Skipped
ci / lint (pull_request) Successful in 4m38s
ci / build (pull_request) Canceled after 0s
ci / image (pull_request) Canceled after 0s
ci / test (pull_request) Canceled after 5m37s
ci / lint (push) Skipped
ci / test (push) Skipped
ci / build (push) Skipped
ci / image (push) Skipped
ci / lint (pull_request) Successful in 4m38s
ci / build (pull_request) Canceled after 0s
ci / image (pull_request) Canceled after 0s
ci / test (pull_request) Canceled after 5m37s
- Go module/build cache, golangci-lint cache and npm cache in the runners' S3 cache for lint, test and build; only main saves (one entry per commit), PRs and tags restore; release restores the build cache - golangci-lint from the release tarball (sha256-checked) instead of compiling it with go install on every run - shellcheck from its static release binary instead of apt-get on every run - the image job packs the build job's amd64 binaries (Dockerfile.ci, distroless, same entrypoint) with the runner's Docker daemon instead of Kaniko rebuilding frontend and Go from the git context; Dockerfile stays for local/make builds Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
efd2f2d793
commit
b5864632bb
3 files changed
+138
-44
No files matched your search
@@ -20,6 +20,19 @@ jobs:
|
||||
v="$(awk '/^go /{print $2}' go.mod)"
|
||||
curl -fsSL "https://go.dev/dl/go${v}.linux-amd64.tar.gz" | tar -C /usr/local -xz
|
||||
echo /usr/local/go/bin >> "$GITHUB_PATH"
|
||||
echo "GO_VERSION=$v" >> "$GITHUB_ENV"
|
||||
# Read-only: the ci workflow's build job saves these caches on main.
|
||||
- name: Restore caches
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: |
|
||||
~/go/pkg/mod
|
||||
~/.cache/go-build
|
||||
~/.npm
|
||||
key: build-go${{ env.GO_VERSION }}-${{ hashFiles('go.sum', 'package-lock.json') }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
build-go${{ env.GO_VERSION }}-${{ hashFiles('go.sum', 'package-lock.json') }}-
|
||||
build-go${{ env.GO_VERSION }}-
|
||||
- name: Check tag
|
||||
run: |
|
||||
go run ./tools/release check "$GITHUB_REF_NAME"
|
||||
@@ -32,7 +45,7 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
- name: Build frontend
|
||||
run: npm ci --no-audit --no-fund && npm run build
|
||||
run: npm ci --no-audit --no-fund --prefer-offline && npm run build
|
||||
- name: Package Helm chart
|
||||
run: |
|
||||
curl -fsSL "https://get.helm.sh/helm-v3.19.0-linux-amd64.tar.gz" | tar -xz -C /usr/local/bin --strip-components=1 linux-amd64/helm
|
||||
|
||||
Reference in new issue
Block a user