Skip to content

Commit fb21f0d

Browse files
committed
Bump docker image to use ubuntu 24.04
1 parent 97b2254 commit fb21f0d

File tree

3 files changed

+53
-4
lines changed

3 files changed

+53
-4
lines changed

.github/workflows/build.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ on:
1414
paths-ignore:
1515
- '**.md'
1616

17+
permissions:
18+
contents: read
19+
1720
jobs:
1821
build:
1922
strategy:
@@ -80,3 +83,48 @@ jobs:
8083
name: runner-package-${{ matrix.runtime }}
8184
path: |
8285
_package
86+
87+
docker:
88+
strategy:
89+
matrix:
90+
os: [ ubuntu-latest, ubuntu-24.04-arm ]
91+
include:
92+
- os: ubuntu-latest
93+
docker_platform: linux/amd64
94+
- os: ubuntu-24.04-arm
95+
docker_platform: linux/arm64
96+
runs-on: ${{ matrix.os }}
97+
steps:
98+
- uses: actions/checkout@v5
99+
100+
- name: Get latest runner version
101+
id: latest_runner
102+
uses: actions/github-script@v7
103+
with:
104+
github-token: ${{secrets.GITHUB_TOKEN}}
105+
script: |
106+
const release = await github.rest.repos.getLatestRelease({
107+
owner: 'actions',
108+
repo: 'runner',
109+
});
110+
const version = release.data.tag_name.replace(/^v/, '');
111+
core.setOutput('version', version);
112+
113+
- name: Setup Docker buildx
114+
uses: docker/setup-buildx-action@v3
115+
116+
- name: Build Docker image
117+
uses: docker/build-push-action@v6
118+
with:
119+
context: ./images
120+
load: true
121+
platforms: ${{ matrix.docker_platform }}
122+
tags: |
123+
${{ github.sha }}:latest
124+
build-args: |
125+
RUNNER_VERSION=${{ steps.latest_runner.outputs.version }}
126+
127+
- name: Test Docker image
128+
run: |
129+
docker run --rm ${{ github.sha }}:latest ./run.sh --version
130+

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,9 @@ jobs:
334334
push: true
335335
labels: |
336336
org.opencontainers.image.source=${{github.server_url}}/${{github.repository}}
337-
org.opencontainers.image.description=https://github.com/actions/runner/releases/tag/v${{ steps.image.outputs.version }}
338337
org.opencontainers.image.licenses=MIT
338+
annotations: |
339+
org.opencontainers.image.description=https://github.com/actions/runner/releases/tag/v${{ steps.image.outputs.version }}
339340
340341
- name: Generate attestation
341342
uses: actions/attest-build-provenance@v3

images/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Source: https://github.com/dotnet/dotnet-docker
2-
FROM mcr.microsoft.com/dotnet/runtime-deps:8.0-jammy AS build
2+
FROM mcr.microsoft.com/dotnet/runtime-deps:8.0-noble AS build
33

44
ARG TARGETOS
55
ARG TARGETARCH
@@ -32,12 +32,12 @@ RUN export RUNNER_ARCH=${TARGETARCH} \
3232
"https://github.com/docker/buildx/releases/download/v${BUILDX_VERSION}/buildx-v${BUILDX_VERSION}.linux-${TARGETARCH}" \
3333
&& chmod +x /usr/local/lib/docker/cli-plugins/docker-buildx
3434

35-
FROM mcr.microsoft.com/dotnet/runtime-deps:8.0-jammy
35+
FROM mcr.microsoft.com/dotnet/runtime-deps:8.0-noble
3636

3737
ENV DEBIAN_FRONTEND=noninteractive
3838
ENV RUNNER_MANUALLY_TRAP_SIG=1
3939
ENV ACTIONS_RUNNER_PRINT_LOG_TO_STDOUT=1
40-
ENV ImageOS=ubuntu22
40+
ENV ImageOS=ubuntu24
4141

4242
# 'gpg-agent' and 'software-properties-common' are needed for the 'add-apt-repository' command that follows
4343
RUN apt update -y \

0 commit comments

Comments
 (0)