Skip to content

Commit 5bf8e64

Browse files
committed
sync(ci): update GitHub Actions cache to v5.0.4
1 parent 6022a8e commit 5bf8e64

16 files changed

Lines changed: 52 additions & 45 deletions

File tree

.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@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
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@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
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@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
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: 2 additions & 4 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@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
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@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
290+
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
293291
with:
294292
path: |
295293
~/.cache/go-build

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

Lines changed: 1 addition & 1 deletion
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@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
75+
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
7676
with:
7777
path: |
7878
~/.cache/goreleaser-bin

.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@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
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@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
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@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
85+
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
8686
with:
8787
path: |
8888
~/.cache/magex-local

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

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
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@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
384+
uses: actions/cache/save@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
376385
with:
377386
path: ~/go/pkg/mod
378387
key: ${{ steps.cache-keys.outputs.module-key }}

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

Lines changed: 2 additions & 2 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
@@ -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
# ================================================================================================

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646

4747
# Initializes the CodeQL tools for scanning.
4848
- name: Initialize CodeQL
49-
uses: github/codeql-action/init@b1bff81932f5cdfc8695c7752dcee935dcd061c8 # v4.33.0
49+
uses: github/codeql-action/init@c6f931105cb2c34c8f901cc885ba1e2e259cf745 # v4.34.0
5050
with:
5151
languages: ${{ matrix.language }}
5252
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -57,7 +57,7 @@ jobs:
5757
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5858
# If this step fails, then you should remove it and run the build manually (see below)
5959
- name: Autobuild
60-
uses: github/codeql-action/autobuild@b1bff81932f5cdfc8695c7752dcee935dcd061c8 # v4.33.0
60+
uses: github/codeql-action/autobuild@c6f931105cb2c34c8f901cc885ba1e2e259cf745 # v4.34.0
6161

6262
# ℹ️ Command-line programs to run using the OS shell.
6363
# 📚 https://git.io/JvXDl
@@ -67,4 +67,4 @@ jobs:
6767
# uses a compiled language
6868

6969
- name: Perform CodeQL Analysis
70-
uses: github/codeql-action/analyze@b1bff81932f5cdfc8695c7752dcee935dcd061c8 # v4.33.0
70+
uses: github/codeql-action/analyze@c6f931105cb2c34c8f901cc885ba1e2e259cf745 # v4.34.0

.github/workflows/fortress-code-quality.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ jobs:
350350
# --------------------------------------------------------------------
351351
- name: 💾 Restore golangci-lint binary cache
352352
id: cache-golangci-lint-binary
353-
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
353+
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
354354
with:
355355
path: ~/.cache/golangci-lint-bin
356356
key: ${{ inputs.primary-runner }}-golangci-lint-binary-${{ env.MAGE_X_GOLANGCI_LINT_VERSION }}
@@ -379,7 +379,7 @@ jobs:
379379
# --------------------------------------------------------------------
380380
- name: 💾 Cache golangci-lint build cache
381381
id: cache-golangci-lint-build
382-
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
382+
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
383383
with:
384384
path: ~/.cache/go-build
385385
key: ${{ inputs.primary-runner }}-go-build-golangci-${{ env.MAGE_X_GOLANGCI_LINT_VERSION }}-${{ hashFiles('**/*.go') }}
@@ -391,7 +391,7 @@ jobs:
391391
# --------------------------------------------------------------------
392392
- name: 💾 Cache golangci-lint analysis
393393
id: cache-golangci-lint
394-
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
394+
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
395395
with:
396396
path: ${{ env.GOLANGCI_LINT_CACHE }}
397397
key: ${{ inputs.primary-runner }}-golangci-lint-analysis-${{ hashFiles('.golangci.json', env.GO_SUM_FILE) }}-${{ steps.golangci-lint-version.outputs.version }}

0 commit comments

Comments
 (0)