Skip to content

Commit c897433

Browse files
authored
sync(ci): update GitHub Actions cache to v5.0.4 (#47)
1 parent d415dac commit c897433

File tree

19 files changed

+69
-56
lines changed

19 files changed

+69
-56
lines changed

.github/actions/cache-redis-image/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ runs:
126126
- name: 💾 Restore Redis image from cache
127127
if: contains(inputs.cache-mode, 'restore')
128128
id: restore-redis-image
129-
uses: actions/cache/restore@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
129+
uses: actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
130130
with:
131131
path: ${{ steps.cache-config.outputs.cache-path }}
132132
key: ${{ steps.cache-config.outputs.cache-key }}
@@ -222,7 +222,7 @@ runs:
222222
# --------------------------------------------------------------------
223223
- name: 🗄️ Save Redis image cache
224224
if: contains(inputs.cache-mode, 'save') && steps.save-redis-image.outputs.image-saved == 'true' && steps.restore-redis-image.outputs.cache-hit != 'true'
225-
uses: actions/cache/save@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
225+
uses: actions/cache/save@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
226226
with:
227227
path: ${{ steps.cache-config.outputs.cache-path }}
228228
key: ${{ steps.cache-config.outputs.cache-key }}

.github/actions/setup-benchstat/action.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ inputs:
3333
description: "Runner OS for cache key (e.g., ubuntu-latest, mac-latest)"
3434
required: true
3535
go-version:
36-
description: "Go version being used (e.g., 1.24.x, 1.22). Benchstat requires Go 1.23+"
36+
description: "Go version being used (e.g., 1.25.x, 1.24). Benchstat requires Go 1.25+"
3737
required: true
3838

3939
outputs:
@@ -44,14 +44,14 @@ outputs:
4444
description: "How benchstat was obtained: cached, fresh, or skipped"
4545
value: ${{ steps.installation-summary.outputs.method }}
4646
skipped:
47-
description: "Whether benchstat installation was skipped due to Go version < 1.23"
47+
description: "Whether benchstat installation was skipped due to Go version < 1.25"
4848
value: ${{ steps.version-check.outputs.skip }}
4949

5050
runs:
5151
using: "composite"
5252
steps:
5353
# --------------------------------------------------------------------
54-
# Check Go version compatibility (benchstat requires Go 1.23+)
54+
# Check Go version compatibility (benchstat requires Go 1.25+)
5555
# --------------------------------------------------------------------
5656
- name: 🔍 Check Go version compatibility
5757
id: version-check
@@ -67,17 +67,17 @@ runs:
6767
MINOR=$(echo "$GO_VERSION" | sed -E 's/^[0-9]+\.([0-9]+).*/\1/')
6868
6969
if [ -z "$MAJOR" ] || [ -z "$MINOR" ] || ! [[ "$MAJOR" =~ ^[0-9]+$ ]] || ! [[ "$MINOR" =~ ^[0-9]+$ ]]; then
70-
echo "❌ Could not parse Go version '$GO_VERSION'. Please provide a valid Go version (e.g., '1.23', '1.24.x')." >&2
70+
echo "❌ Could not parse Go version '$GO_VERSION'. Please provide a valid Go version (e.g., '1.25', '1.26.x')." >&2
7171
exit 1
7272
elif [ "$MAJOR" -gt 1 ]; then
73-
# Any Go major version > 1 is considered compatible with the 1.23+ requirement
74-
echo "✅ Go $GO_VERSION >= 1.23: proceeding with benchstat installation"
73+
# Any Go major version > 1 is considered compatible with the 1.25+ requirement
74+
echo "✅ Go $GO_VERSION >= 1.25: proceeding with benchstat installation"
7575
echo "skip=false" >> $GITHUB_OUTPUT
76-
elif [ "$MAJOR" -eq 1 ] && [ "$MINOR" -lt 23 ]; then
77-
echo "⚠️ Go $GO_VERSION < 1.23: skipping benchstat installation (requires Go 1.23+)"
76+
elif [ "$MAJOR" -eq 1 ] && [ "$MINOR" -lt 25 ]; then
77+
echo "⚠️ Go $GO_VERSION < 1.25: skipping benchstat installation (requires Go 1.25+)"
7878
echo "skip=true" >> $GITHUB_OUTPUT
7979
else
80-
echo "✅ Go $GO_VERSION >= 1.23: proceeding with benchstat installation"
80+
echo "✅ Go $GO_VERSION >= 1.25: proceeding with benchstat installation"
8181
echo "skip=false" >> $GITHUB_OUTPUT
8282
fi
8383
@@ -87,7 +87,7 @@ runs:
8787
- name: 💾 Restore benchstat binary cache
8888
if: steps.version-check.outputs.skip != 'true'
8989
id: benchstat-cache
90-
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
90+
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
9191
with:
9292
path: ~/.cache/benchstat-bin
9393
key: ${{ inputs.runner-os }}-benchstat-${{ inputs.benchstat-version }}
@@ -140,7 +140,7 @@ runs:
140140
run: |
141141
# Check if installation was skipped due to Go version
142142
if [[ "${{ steps.version-check.outputs.skip }}" == "true" ]]; then
143-
echo "⏭️ Benchstat installation skipped (Go version < 1.23)"
143+
echo "⏭️ Benchstat installation skipped (Go version < 1.25)"
144144
echo "method=skipped" >> $GITHUB_OUTPUT
145145
echo "📋 Installation method: Skipped"
146146
exit 0

.github/actions/setup-go-with-cache/action.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -211,11 +211,10 @@ runs:
211211
212212
# --------------------------------------------------------------------
213213
# Go module cache (shared across versions)
214-
# Uses actions/cache@v4 which handles both restore and save
215214
# --------------------------------------------------------------------
216215
- name: 💾 Go module cache
217216
id: restore-gomod
218-
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
217+
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
219218
with:
220219
path: ~/go/pkg/mod
221220
key: ${{ steps.cache-keys.outputs.module-key }}
@@ -285,11 +284,10 @@ runs:
285284
286285
# --------------------------------------------------------------------
287286
# Go build cache (per-version)
288-
# Uses actions/cache@v4 which handles both restore and save
289287
# --------------------------------------------------------------------
290288
- name: 💾 Go build cache
291289
id: restore-gobuild
292-
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
290+
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
293291
with:
294292
path: |
295293
~/.cache/go-build
@@ -442,7 +440,7 @@ runs:
442440
# --------------------------------------------------------------------
443441
- name: 🏗️ Set up Go
444442
id: setup-go
445-
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
443+
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
446444
with:
447445
go-version: ${{ inputs.go-version }}
448446
cache: false # we handle caches ourselves

.github/actions/setup-goreleaser/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ runs:
7272
- name: 💾 Restore goreleaser binary cache
7373
id: goreleaser-cache
7474
if: steps.check-existing.outputs.exists != 'true'
75-
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
75+
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
7676
with:
7777
path: |
7878
~/.cache/goreleaser-bin
@@ -105,7 +105,7 @@ runs:
105105
# --------------------------------------------------------------------
106106
- name: ✅ Install GoReleaser (cache miss)
107107
if: steps.check-existing.outputs.exists != 'true' && steps.goreleaser-cache.outputs.cache-hit != 'true'
108-
uses: goreleaser/goreleaser-action@v6
108+
uses: goreleaser/goreleaser-action@ec59f474b9834571250b370d4735c50f8e2d1e29 # v7.0.0
109109
with:
110110
distribution: goreleaser
111111
version: ${{ inputs.goreleaser-version }}

.github/actions/setup-mage/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ runs:
4747
# --------------------------------------------------------------------
4848
- name: 💾 Restore mage binary cache
4949
id: mage-cache
50-
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
50+
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
5151
with:
5252
path: ~/.cache/mage-bin
5353
key: ${{ inputs.runner-os }}-mage-${{ inputs.mage-version }}

.github/actions/setup-magex/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ runs:
5353
- name: 💾 Restore magex binary cache
5454
id: magex-cache
5555
if: inputs.use-local != 'true'
56-
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
56+
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
5757
with:
5858
path: |
5959
~/.cache/magex-bin
@@ -82,7 +82,7 @@ runs:
8282
- name: 💾 Restore magex binary cache (local)
8383
id: magex-local-cache
8484
if: inputs.use-local == 'true'
85-
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
85+
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
8686
with:
8787
path: |
8888
~/.cache/magex-local

.github/actions/upload-artifact-resilient/action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ runs:
5252
- name: "📤 Upload ${{ inputs.artifact-name }} (attempt 1)"
5353
id: attempt1
5454
continue-on-error: true
55-
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
55+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
5656
with:
5757
name: ${{ inputs.artifact-name }}
5858
path: ${{ inputs.artifact-path }}
@@ -80,7 +80,7 @@ runs:
8080
id: attempt2
8181
if: steps.attempt1.outcome == 'failure'
8282
continue-on-error: true
83-
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
83+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
8484
with:
8585
name: ${{ inputs.artifact-name }}
8686
path: ${{ inputs.artifact-path }}
@@ -108,7 +108,7 @@ runs:
108108
id: attempt3
109109
if: steps.attempt1.outcome == 'failure' && steps.attempt2.outcome == 'failure'
110110
continue-on-error: ${{ inputs.continue-on-error == 'true' }}
111-
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
111+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
112112
with:
113113
name: ${{ inputs.artifact-name }}
114114
path: ${{ inputs.artifact-path }}

.github/actions/upload-statistics/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ runs:
5959
- name: 📤 Upload ${{ inputs.artifact-name }}
6060
if: always() # Always run to capture data even on job failure
6161
continue-on-error: ${{ inputs.continue-on-error == 'true' }}
62-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
62+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
6363
with:
6464
name: ${{ inputs.artifact-name }}
6565
path: ${{ inputs.artifact-path }}

.github/actions/warm-cache/action.yml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ runs:
267267
# ────────────────────────────────────────────────────────────────────────────
268268
- name: 📥 Full checkout for module download (module cache miss)
269269
if: steps.setup-go.outputs.module-cache-hit != 'true'
270-
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
270+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
271271
with:
272272
persist-credentials: false
273273

@@ -306,7 +306,7 @@ runs:
306306
# ────────────────────────────────────────────────────────────────────────────
307307
- name: 📥 Full checkout for build warming (module hit, build miss)
308308
if: steps.setup-go.outputs.module-cache-hit == 'true' && steps.setup-go.outputs.build-cache-hit != 'true'
309-
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
309+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
310310
with:
311311
persist-credentials: false
312312

@@ -319,6 +319,15 @@ runs:
319319
run: |
320320
set -euo pipefail
321321
GO_MODULE_DIR="${{ env.GO_MODULE_DIR }}"
322+
BUILD_STRATEGY="${MAGE_X_BUILD_STRATEGY:-smart}"
323+
324+
# Allow skipping pre-build entirely (useful when packages OOM on standard runners)
325+
if [ "$BUILD_STRATEGY" == "skip" ]; then
326+
echo "⏭️ Build pre-compilation skipped (MAGE_X_BUILD_STRATEGY=skip)"
327+
echo "ℹ️ Module cache is still warmed — build cache will populate on first real build"
328+
exit 0
329+
fi
330+
322331
echo "🔧 Build cache miss - pre-building packages..."
323332
324333
echo "============================================================"
@@ -333,21 +342,21 @@ runs:
333342
echo "🔧 Multi-module mode - running build commands from repository root"
334343
echo "📦 magex will discover all Go modules and pre-build packages"
335344
# Use configured parallelism to avoid OOM on GitHub Actions runners
336-
magex build:prebuild p="$PARALLEL_JOBS" strategy="${MAGE_X_BUILD_STRATEGY:-smart}" batch_size="${MAGE_X_BUILD_BATCH_SIZE:-20}" batch_delay="${MAGE_X_BUILD_BATCH_DELAY_MS:-0}" exclude="${MAGE_X_BUILD_EXCLUDE_PATTERN:-}"
345+
magex build:prebuild p="$PARALLEL_JOBS" strategy="${BUILD_STRATEGY}" batch_size="${MAGE_X_BUILD_BATCH_SIZE:-20}" batch_delay="${MAGE_X_BUILD_BATCH_DELAY_MS:-0}" exclude="${MAGE_X_BUILD_EXCLUDE_PATTERN:-}"
337346
338347
echo "🏗️ Building stdlib for host platform..."
339348
magex install:stdlib
340349
elif [ -n "$GO_MODULE_DIR" ]; then
341350
echo "🔧 Running build commands from directory: $GO_MODULE_DIR"
342351
# Use configured parallelism to avoid OOM on GitHub Actions runners
343-
(cd "$GO_MODULE_DIR" && magex build:prebuild p="$PARALLEL_JOBS" strategy="${MAGE_X_BUILD_STRATEGY:-smart}" batch_size="${MAGE_X_BUILD_BATCH_SIZE:-20}" batch_delay="${MAGE_X_BUILD_BATCH_DELAY_MS:-0}" exclude="${MAGE_X_BUILD_EXCLUDE_PATTERN:-}")
352+
(cd "$GO_MODULE_DIR" && magex build:prebuild p="$PARALLEL_JOBS" strategy="${BUILD_STRATEGY}" batch_size="${MAGE_X_BUILD_BATCH_SIZE:-20}" batch_delay="${MAGE_X_BUILD_BATCH_DELAY_MS:-0}" exclude="${MAGE_X_BUILD_EXCLUDE_PATTERN:-}")
344353
345354
echo "🏗️ Building stdlib for host platform..."
346355
(cd "$GO_MODULE_DIR" && magex install:stdlib)
347356
else
348357
echo "🔧 Running build commands from repository root"
349358
# Use configured parallelism to avoid OOM on GitHub Actions runners
350-
magex build:prebuild p="$PARALLEL_JOBS" strategy="${MAGE_X_BUILD_STRATEGY:-smart}" batch_size="${MAGE_X_BUILD_BATCH_SIZE:-20}" batch_delay="${MAGE_X_BUILD_BATCH_DELAY_MS:-0}" exclude="${MAGE_X_BUILD_EXCLUDE_PATTERN:-}"
359+
magex build:prebuild p="$PARALLEL_JOBS" strategy="${BUILD_STRATEGY}" batch_size="${MAGE_X_BUILD_BATCH_SIZE:-20}" batch_delay="${MAGE_X_BUILD_BATCH_DELAY_MS:-0}" exclude="${MAGE_X_BUILD_EXCLUDE_PATTERN:-}"
351360
352361
echo "🏗️ Building stdlib for host platform..."
353362
magex install:stdlib
@@ -360,7 +369,7 @@ runs:
360369
# ────────────────────────────────────────────────────────────────────────────
361370
- name: 💾 Save Go build cache
362371
if: steps.setup-go.outputs.build-cache-hit != 'true'
363-
uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.0.2
372+
uses: actions/cache/save@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
364373
with:
365374
path: |
366375
~/.cache/go-build
@@ -372,7 +381,7 @@ runs:
372381
# ────────────────────────────────────────────────────────────────────────────
373382
- name: 💾 Save Go module cache
374383
if: steps.setup-go.outputs.module-cache-hit != 'true'
375-
uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.0.2
384+
uses: actions/cache/save@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
376385
with:
377386
path: ~/go/pkg/mod
378387
key: ${{ steps.cache-keys.outputs.module-key }}
@@ -437,7 +446,7 @@ runs:
437446
# --------------------------------------------------------------------
438447
- name: 📤 Upload cache statistics
439448
if: always()
440-
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
449+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
441450
with:
442451
name: cache-stats-${{ inputs.matrix-os }}-${{ inputs.go-version }}
443452
path: cache-stats-*.json

.github/env/10-mage-x.env

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
# ================================================================================================
3737

3838
# MAGE-X version
39-
MAGE_X_VERSION=v1.20.8
39+
MAGE_X_VERSION=v1.20.11
4040

4141
# For mage-x development, set to 'true' to use local version instead of downloading from releases
4242
MAGE_X_USE_LOCAL=false
@@ -61,8 +61,8 @@ MAGE_X_FORMAT_EXCLUDE_PATHS=vendor,node_modules,.git,.idea
6161

6262
MAGE_X_GITLEAKS_VERSION=8.30.0
6363
MAGE_X_GOFUMPT_VERSION=v0.9.2
64-
MAGE_X_GOLANGCI_LINT_VERSION=v2.11.2
65-
MAGE_X_GORELEASER_VERSION=v2.14.2
64+
MAGE_X_GOLANGCI_LINT_VERSION=v2.11.3
65+
MAGE_X_GORELEASER_VERSION=v2.14.3
6666
MAGE_X_GOVULNCHECK_VERSION=v1.1.4
6767
MAGE_X_GO_SECONDARY_VERSION=1.24.x
6868
MAGE_X_GO_VERSION=1.24.x
@@ -71,7 +71,7 @@ MAGE_X_NANCY_VERSION=v1.2.0
7171
MAGE_X_STATICCHECK_VERSION=2026.1
7272
MAGE_X_SWAG_VERSION=v1.16.6
7373
MAGE_X_YAMLFMT_VERSION=v0.21.0
74-
MAGE_X_BENCHSTAT_VERSION=v0.0.0-20260211190930-8161c38c6cdc
74+
MAGE_X_BENCHSTAT_VERSION=v0.0.0-20260312031701-16a31bc5fbd0
7575
MAGE_X_MAGE_VERSION=v1.16.0
7676

7777
# ================================================================================================

0 commit comments

Comments
 (0)