Skip to content

Commit f5291d6

Browse files
miguelgilaclaude
andauthored
fix: update GitHub Actions to Node.js 24-compatible versions (#38)
* fix: update GitHub Actions to Node.js 24-compatible versions Closes #35 Update all GitHub Actions to versions that use Node.js 24 runtime, ahead of the June 2, 2026 deprecation of Node.js 20 runners. Actions updated: - actions/checkout: v3/v4 → v6 - actions/upload-artifact: v4 → v7 - actions/download-artifact: v4 → v8 - actions/create-github-app-token: v1 → v3 - codecov/codecov-action: v3 → v5 - azure/setup-kubectl: v3 → v4 - docker/setup-qemu-action: v3 → v4 - docker/setup-buildx-action: v3 → v4 - docker/login-action: v3 → v4 - docker/build-push-action: v5 → v7 Replaced archived kenji-miyake/setup-git-cliff@v2 (node20, will never get node24) with cargo install git-cliff. Actions already compatible (composite/no Node runtime, unchanged): - Swatinem/rust-cache@v2, sigstore/cosign-installer@v3, dtolnay/rust-toolchain@stable, taiki-e/install-action Actions with no node24 release yet (kept current): - azure/setup-helm@v4, softprops/action-gh-release@v2 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: use intermediate FROM stage for buildx COPY --from Newer BuildKit (shipped with docker/build-push-action v7) no longer supports variable expansion in COPY --from=builder-${TARGETARCH}. Use an intermediate FROM stage instead, since FROM supports global ARG expansion. Fixes #39 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 38c522f commit f5291d6

File tree

7 files changed

+49
-37
lines changed

7 files changed

+49
-37
lines changed

.github/workflows/auto-release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ jobs:
2121
steps:
2222
- name: Generate GitHub App token
2323
id: app-token
24-
uses: actions/create-github-app-token@v1
24+
uses: actions/create-github-app-token@v3
2525
with:
2626
app-id: ${{ secrets.APP_ID }}
2727
private-key: ${{ secrets.APP_PRIVATE_KEY }}
2828

2929
- name: Checkout
30-
uses: actions/checkout@v3
30+
uses: actions/checkout@v6
3131
with:
3232
token: ${{ steps.app-token.outputs.token }}
3333
fetch-depth: 0
@@ -92,7 +92,7 @@ jobs:
9292
9393
- name: Install git-cliff
9494
if: steps.loop-guard.outputs.skip != 'true'
95-
uses: kenji-miyake/setup-git-cliff@v2
95+
run: cargo install git-cliff
9696

9797
- name: Generate changelog
9898
if: steps.loop-guard.outputs.skip != 'true'

.github/workflows/ci.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
name: Format
2626
runs-on: ubuntu-latest
2727
steps:
28-
- uses: actions/checkout@v4
28+
- uses: actions/checkout@v6
2929
- uses: dtolnay/rust-toolchain@stable
3030
with:
3131
components: rustfmt
@@ -36,7 +36,7 @@ jobs:
3636
name: Clippy
3737
runs-on: ubuntu-latest
3838
steps:
39-
- uses: actions/checkout@v4
39+
- uses: actions/checkout@v6
4040
- uses: dtolnay/rust-toolchain@stable
4141
with:
4242
components: clippy
@@ -48,7 +48,7 @@ jobs:
4848
name: Security Audit
4949
runs-on: ubuntu-latest
5050
steps:
51-
- uses: actions/checkout@v4
51+
- uses: actions/checkout@v6
5252
- uses: dtolnay/rust-toolchain@stable
5353
- name: Install cargo-audit
5454
run: cargo install cargo-audit
@@ -59,7 +59,7 @@ jobs:
5959
name: Tests
6060
runs-on: ubuntu-latest
6161
steps:
62-
- uses: actions/checkout@v4
62+
- uses: actions/checkout@v6
6363
- uses: dtolnay/rust-toolchain@stable
6464
- uses: Swatinem/rust-cache@v2
6565
- name: Run tests
@@ -69,15 +69,15 @@ jobs:
6969
name: Coverage
7070
runs-on: ubuntu-latest
7171
steps:
72-
- uses: actions/checkout@v4
72+
- uses: actions/checkout@v6
7373
- uses: dtolnay/rust-toolchain@stable
7474
- uses: Swatinem/rust-cache@v2
7575
- name: Install tarpaulin
7676
uses: taiki-e/install-action@cargo-tarpaulin
7777
- name: Generate coverage
7878
run: cargo tarpaulin
7979
- name: Upload coverage to Codecov
80-
uses: codecov/codecov-action@v3
80+
uses: codecov/codecov-action@v5
8181
with:
8282
files: ./cobertura.xml
8383
token: ${{ secrets.CODECOV_TOKEN }}
@@ -88,7 +88,7 @@ jobs:
8888
name: Build and Cache
8989
runs-on: ubuntu-latest
9090
steps:
91-
- uses: actions/checkout@v4
91+
- uses: actions/checkout@v6
9292
- name: Build all binaries (musl static)
9393
run: |
9494
docker run --rm \
@@ -101,7 +101,7 @@ jobs:
101101
--bin reaper-agent \
102102
--bin reaper-controller \
103103
--target x86_64-unknown-linux-musl
104-
- uses: actions/upload-artifact@v4
104+
- uses: actions/upload-artifact@v7
105105
with:
106106
name: musl-binaries
107107
path: |
@@ -116,9 +116,9 @@ jobs:
116116
needs: build-musl
117117
runs-on: ubuntu-latest
118118
steps:
119-
- uses: actions/checkout@v4
119+
- uses: actions/checkout@v6
120120

121-
- uses: actions/download-artifact@v4
121+
- uses: actions/download-artifact@v8
122122
with:
123123
name: musl-binaries
124124
path: target/x86_64-unknown-linux-musl/release/
@@ -127,7 +127,7 @@ jobs:
127127
run: chmod +x target/x86_64-unknown-linux-musl/release/*
128128

129129
- name: Install kubectl
130-
uses: azure/setup-kubectl@v3
130+
uses: azure/setup-kubectl@v4
131131
with:
132132
version: "v1.30.0"
133133

@@ -163,7 +163,7 @@ jobs:
163163
needs: cargo-test
164164
runs-on: ubuntu-latest
165165
steps:
166-
- uses: actions/checkout@v4
166+
- uses: actions/checkout@v6
167167

168168
- name: Install kind
169169
run: |
@@ -173,7 +173,7 @@ jobs:
173173
sudo mv ./kind /usr/local/bin/kind
174174
175175
- name: Install kubectl
176-
uses: azure/setup-kubectl@v3
176+
uses: azure/setup-kubectl@v4
177177
with:
178178
version: "v1.30.0"
179179

.github/workflows/manual-release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ jobs:
3030
steps:
3131
- name: Generate GitHub App token
3232
id: app-token
33-
uses: actions/create-github-app-token@v1
33+
uses: actions/create-github-app-token@v3
3434
with:
3535
app-id: ${{ secrets.APP_ID }}
3636
private-key: ${{ secrets.APP_PRIVATE_KEY }}
3737

3838
- name: Checkout
39-
uses: actions/checkout@v3
39+
uses: actions/checkout@v6
4040
with:
4141
token: ${{ steps.app-token.outputs.token }}
4242
fetch-depth: 0
@@ -95,7 +95,7 @@ jobs:
9595
fi
9696
9797
- name: Install git-cliff
98-
uses: kenji-miyake/setup-git-cliff@v2
98+
run: cargo install git-cliff
9999

100100
- name: Generate changelog
101101
run: git-cliff --tag "v${{ steps.bump.outputs.version }}" -o CHANGELOG.md

.github/workflows/release.yml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
needs: resolve-tag
3636
runs-on: ubuntu-latest
3737
steps:
38-
- uses: actions/checkout@v3
38+
- uses: actions/checkout@v6
3939
with:
4040
ref: ${{ needs.resolve-tag.outputs.tag }}
4141

@@ -75,7 +75,7 @@ jobs:
7575
arch: aarch64
7676
musl_image: messense/rust-musl-cross:aarch64-musl
7777
steps:
78-
- uses: actions/checkout@v3
78+
- uses: actions/checkout@v6
7979
with:
8080
ref: ${{ needs.resolve-tag.outputs.tag }}
8181

@@ -116,7 +116,7 @@ jobs:
116116
echo "TARBALL=${DIRNAME}.tar.gz" >> "$GITHUB_ENV"
117117
118118
- name: Upload artifact
119-
uses: actions/upload-artifact@v4
119+
uses: actions/upload-artifact@v7
120120
with:
121121
name: release-${{ matrix.target }}
122122
path: "*.tar.gz"
@@ -138,18 +138,18 @@ jobs:
138138
- image: reaper-node
139139
dockerfile: Dockerfile.node
140140
steps:
141-
- uses: actions/checkout@v3
141+
- uses: actions/checkout@v6
142142
with:
143143
ref: ${{ needs.resolve-tag.outputs.tag }}
144144

145145
- name: Set up QEMU
146-
uses: docker/setup-qemu-action@v3
146+
uses: docker/setup-qemu-action@v4
147147

148148
- name: Set up Docker Buildx
149-
uses: docker/setup-buildx-action@v3
149+
uses: docker/setup-buildx-action@v4
150150

151151
- name: Login to GHCR
152-
uses: docker/login-action@v3
152+
uses: docker/login-action@v4
153153
with:
154154
registry: ghcr.io
155155
username: ${{ github.actor }}
@@ -163,7 +163,7 @@ jobs:
163163
164164
- name: Build and push
165165
id: build-push
166-
uses: docker/build-push-action@v5
166+
uses: docker/build-push-action@v7
167167
with:
168168
context: .
169169
file: ${{ matrix.dockerfile }}
@@ -193,7 +193,7 @@ jobs:
193193
packages: write
194194
id-token: write # Required for cosign keyless signing via GitHub OIDC
195195
steps:
196-
- uses: actions/checkout@v3
196+
- uses: actions/checkout@v6
197197
with:
198198
ref: ${{ needs.resolve-tag.outputs.tag }}
199199

@@ -206,7 +206,7 @@ jobs:
206206
helm registry login ghcr.io -u "${{ github.actor }}" --password-stdin
207207
208208
- name: Login to GHCR (cosign/Docker credentials)
209-
uses: docker/login-action@v3
209+
uses: docker/login-action@v4
210210
with:
211211
registry: ghcr.io
212212
username: ${{ github.actor }}
@@ -246,13 +246,15 @@ jobs:
246246
contents: write
247247
id-token: write # Required for cosign keyless signing via GitHub OIDC
248248
steps:
249-
- uses: actions/checkout@v3
249+
- uses: actions/checkout@v6
250250
with:
251251
ref: ${{ needs.resolve-tag.outputs.tag }}
252252
fetch-depth: 0
253253

254+
- uses: dtolnay/rust-toolchain@stable
255+
254256
- name: Install git-cliff
255-
uses: kenji-miyake/setup-git-cliff@v2
257+
run: cargo install git-cliff
256258

257259
- name: Generate release notes
258260
id: release-notes
@@ -267,7 +269,7 @@ jobs:
267269
uses: sigstore/cosign-installer@v3
268270

269271
- name: Download all artifacts
270-
uses: actions/download-artifact@v4
272+
uses: actions/download-artifact@v8
271273
with:
272274
path: artifacts/
273275

Dockerfile.agent

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,11 @@ COPY . .
1515
RUN cargo build --release --features agent --bin reaper-agent --target aarch64-unknown-linux-musl && \
1616
cp target/aarch64-unknown-linux-musl/release/reaper-agent /reaper-agent
1717

18+
# --- Arch selector (FROM supports global ARG expansion, COPY --from does not) ---
19+
ARG TARGETARCH
20+
FROM builder-${TARGETARCH} AS builder
21+
1822
# --- Runtime stage ---
1923
FROM gcr.io/distroless/static-debian12
20-
ARG TARGETARCH
21-
COPY --from=builder-${TARGETARCH} /reaper-agent /reaper-agent
24+
COPY --from=builder /reaper-agent /reaper-agent
2225
ENTRYPOINT ["/reaper-agent"]

Dockerfile.controller

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,12 @@ COPY . .
1515
RUN cargo build --release --features controller --bin reaper-controller --target aarch64-unknown-linux-musl && \
1616
cp target/aarch64-unknown-linux-musl/release/reaper-controller /reaper-controller
1717

18+
# --- Arch selector (FROM supports global ARG expansion, COPY --from does not) ---
19+
ARG TARGETARCH
20+
FROM builder-${TARGETARCH} AS builder
21+
1822
# --- Runtime stage ---
1923
FROM gcr.io/distroless/static-debian12:nonroot
20-
ARG TARGETARCH
21-
COPY --from=builder-${TARGETARCH} /reaper-controller /usr/local/bin/reaper-controller
24+
COPY --from=builder /reaper-controller /usr/local/bin/reaper-controller
2225
USER nonroot:nonroot
2326
ENTRYPOINT ["/usr/local/bin/reaper-controller"]

Dockerfile.node

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,14 @@ RUN cargo build --release \
2727
cp target/aarch64-unknown-linux-musl/release/containerd-shim-reaper-v2 /out/ && \
2828
cp target/aarch64-unknown-linux-musl/release/reaper-runtime /out/
2929

30+
# --- Arch selector (FROM supports global ARG expansion, COPY --from does not) ---
31+
ARG TARGETARCH
32+
FROM builder-${TARGETARCH} AS builder
33+
3034
# --- Runtime stage ---
3135
FROM alpine:3.19
3236
ARG TARGETARCH
33-
COPY --from=builder-${TARGETARCH} /out/ /binaries/${TARGETARCH}/
37+
COPY --from=builder /out/ /binaries/${TARGETARCH}/
3438
COPY scripts/install-node.sh /install.sh
3539
RUN chmod +x /install.sh
3640
ENTRYPOINT ["/install.sh"]

0 commit comments

Comments
 (0)