Skip to content

Commit c5e16b1

Browse files
committed
Merge upstream for node24 support
1 parent 3c71bc6 commit c5e16b1

97 files changed

Lines changed: 7396 additions & 1440 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"features": {
55
"ghcr.io/devcontainers/features/docker-in-docker:1": {},
66
"ghcr.io/devcontainers/features/dotnet": {
7-
"version": "8.0.404"
7+
"version": "8.0.412"
88
},
99
"ghcr.io/devcontainers/features/node:1": {
1010
"version": "20"

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
devScript: ./dev.sh
5353

5454
- runtime: win-x64
55-
os: windows-2022
55+
os: windows-latest
5656
devScript: ./dev
5757
exeSuffix: .exe
5858
scriptSuffix: .cmd

.github/workflows/codeql.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626

2727
# Initializes the CodeQL tools for scanning.
2828
- name: Initialize CodeQL
29-
uses: github/codeql-action/init@v2
29+
uses: github/codeql-action/init@v3
3030
# Override language selection by uncommenting this and choosing your languages
3131
# with:
3232
# languages: go, javascript, csharp, python, cpp, java
@@ -37,4 +37,4 @@ jobs:
3737
working-directory: src/Runner.Client
3838

3939
- name: Perform CodeQL Analysis
40-
uses: github/codeql-action/analyze@v2
40+
uses: github/codeql-action/analyze@v3
Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
name: "Docker/Buildx Version Upgrade"
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * 1' # Run every Monday at midnight
6+
workflow_dispatch: # Allow manual triggering
7+
8+
jobs:
9+
check-versions:
10+
runs-on: ubuntu-latest
11+
outputs:
12+
DOCKER_SHOULD_UPDATE: ${{ steps.check_docker_version.outputs.SHOULD_UPDATE }}
13+
DOCKER_LATEST_VERSION: ${{ steps.check_docker_version.outputs.LATEST_VERSION }}
14+
DOCKER_CURRENT_VERSION: ${{ steps.check_docker_version.outputs.CURRENT_VERSION }}
15+
BUILDX_SHOULD_UPDATE: ${{ steps.check_buildx_version.outputs.SHOULD_UPDATE }}
16+
BUILDX_LATEST_VERSION: ${{ steps.check_buildx_version.outputs.LATEST_VERSION }}
17+
BUILDX_CURRENT_VERSION: ${{ steps.check_buildx_version.outputs.CURRENT_VERSION }}
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
22+
- name: Check Docker version
23+
id: check_docker_version
24+
shell: bash
25+
run: |
26+
# Extract current Docker version from Dockerfile
27+
current_version=$(grep "ARG DOCKER_VERSION=" ./images/Dockerfile | cut -d'=' -f2)
28+
29+
# Fetch latest Docker Engine version from Docker's download site
30+
# This gets the latest Linux static binary version which matches what's used in the Dockerfile
31+
latest_version=$(curl -s https://download.docker.com/linux/static/stable/x86_64/ | grep -o 'docker-[0-9]*\.[0-9]*\.[0-9]*\.tgz' | sort -V | tail -n 1 | sed 's/docker-\(.*\)\.tgz/\1/')
32+
33+
# Extra check to ensure we got a valid version
34+
if [[ ! $latest_version =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
35+
echo "Failed to retrieve a valid Docker version"
36+
exit 1
37+
fi
38+
39+
should_update=0
40+
[ "$current_version" != "$latest_version" ] && should_update=1
41+
42+
echo "CURRENT_VERSION=${current_version}" >> $GITHUB_OUTPUT
43+
echo "LATEST_VERSION=${latest_version}" >> $GITHUB_OUTPUT
44+
echo "SHOULD_UPDATE=${should_update}" >> $GITHUB_OUTPUT
45+
46+
- name: Check Buildx version
47+
id: check_buildx_version
48+
shell: bash
49+
run: |
50+
# Extract current Buildx version from Dockerfile
51+
current_version=$(grep "ARG BUILDX_VERSION=" ./images/Dockerfile | cut -d'=' -f2)
52+
53+
# Fetch latest Buildx version
54+
latest_version=$(curl -s https://api.github.com/repos/docker/buildx/releases/latest | jq -r '.tag_name' | sed 's/^v//')
55+
56+
should_update=0
57+
[ "$current_version" != "$latest_version" ] && should_update=1
58+
59+
echo "CURRENT_VERSION=${current_version}" >> $GITHUB_OUTPUT
60+
echo "LATEST_VERSION=${latest_version}" >> $GITHUB_OUTPUT
61+
echo "SHOULD_UPDATE=${should_update}" >> $GITHUB_OUTPUT
62+
63+
- name: Create annotations for versions
64+
run: |
65+
docker_should_update="${{ steps.check_docker_version.outputs.SHOULD_UPDATE }}"
66+
buildx_should_update="${{ steps.check_buildx_version.outputs.SHOULD_UPDATE }}"
67+
68+
# Show annotation if only Docker needs update
69+
if [[ "$docker_should_update" == "1" && "$buildx_should_update" == "0" ]]; then
70+
echo "::warning ::Docker version (${{ steps.check_docker_version.outputs.LATEST_VERSION }}) needs update but Buildx is current. Only updating when both need updates."
71+
fi
72+
73+
# Show annotation if only Buildx needs update
74+
if [[ "$docker_should_update" == "0" && "$buildx_should_update" == "1" ]]; then
75+
echo "::warning ::Buildx version (${{ steps.check_buildx_version.outputs.LATEST_VERSION }}) needs update but Docker is current. Only updating when both need updates."
76+
fi
77+
78+
# Show annotation when both are current
79+
if [[ "$docker_should_update" == "0" && "$buildx_should_update" == "0" ]]; then
80+
echo "::warning ::Latest Docker version is ${{ steps.check_docker_version.outputs.LATEST_VERSION }} and Buildx version is ${{ steps.check_buildx_version.outputs.LATEST_VERSION }}. No updates needed."
81+
fi
82+
83+
update-versions:
84+
permissions:
85+
pull-requests: write
86+
contents: write
87+
needs: [check-versions]
88+
if: ${{ needs.check-versions.outputs.DOCKER_SHOULD_UPDATE == 1 && needs.check-versions.outputs.BUILDX_SHOULD_UPDATE == 1 }}
89+
runs-on: ubuntu-latest
90+
steps:
91+
- name: Checkout repository
92+
uses: actions/checkout@v4
93+
94+
- name: Update Docker version
95+
shell: bash
96+
run: |
97+
latest_version="${{ needs.check-versions.outputs.DOCKER_LATEST_VERSION }}"
98+
current_version="${{ needs.check-versions.outputs.DOCKER_CURRENT_VERSION }}"
99+
100+
# Update version in Dockerfile
101+
sed -i "s/ARG DOCKER_VERSION=$current_version/ARG DOCKER_VERSION=$latest_version/g" ./images/Dockerfile
102+
103+
- name: Update Buildx version
104+
shell: bash
105+
run: |
106+
latest_version="${{ needs.check-versions.outputs.BUILDX_LATEST_VERSION }}"
107+
current_version="${{ needs.check-versions.outputs.BUILDX_CURRENT_VERSION }}"
108+
109+
# Update version in Dockerfile
110+
sed -i "s/ARG BUILDX_VERSION=$current_version/ARG BUILDX_VERSION=$latest_version/g" ./images/Dockerfile
111+
112+
- name: Commit changes and create Pull Request
113+
env:
114+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
115+
run: |
116+
# Setup branch and commit information
117+
branch_name="feature/docker-buildx-upgrade"
118+
commit_message="Upgrade Docker to v${{ needs.check-versions.outputs.DOCKER_LATEST_VERSION }} and Buildx to v${{ needs.check-versions.outputs.BUILDX_LATEST_VERSION }}"
119+
pr_title="Update Docker to v${{ needs.check-versions.outputs.DOCKER_LATEST_VERSION }} and Buildx to v${{ needs.check-versions.outputs.BUILDX_LATEST_VERSION }}"
120+
121+
# Configure git
122+
git config --global user.name "github-actions[bot]"
123+
git config --global user.email "<41898282+github-actions[bot]@users.noreply.github.com>"
124+
125+
# Create branch or switch to it if it exists
126+
if git show-ref --quiet refs/remotes/origin/$branch_name; then
127+
git fetch origin
128+
git checkout -B "$branch_name" origin/$branch_name
129+
else
130+
git checkout -b "$branch_name"
131+
fi
132+
133+
# Commit and push changes
134+
git commit -a -m "$commit_message"
135+
git push --force origin "$branch_name"
136+
137+
# Create PR
138+
pr_body="Upgrades Docker version from ${{ needs.check-versions.outputs.DOCKER_CURRENT_VERSION }} to ${{ needs.check-versions.outputs.DOCKER_LATEST_VERSION }} and Docker Buildx version from ${{ needs.check-versions.outputs.BUILDX_CURRENT_VERSION }} to ${{ needs.check-versions.outputs.BUILDX_LATEST_VERSION }}.\n\n"
139+
pr_body+="Release notes: https://docs.docker.com/engine/release-notes/\n\n"
140+
pr_body+="---\n\nAutogenerated by [Docker/Buildx Version Upgrade Workflow](https://github.com/actions/runner/blob/main/.github/workflows/docker-buildx-upgrade.yml)"
141+
142+
gh pr create -B main -H "$branch_name" \
143+
--title "$pr_title" \
144+
--body "$pr_body"

docs/adrs/0276-problem-matchers.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,42 @@ Two problem matchers can be used:
250250
}
251251
```
252252

253+
#### Default from path
254+
255+
The problem matcher can specify a `fromPath` property at the top level, which applies when a specific pattern doesn't provide a value for `fromPath`. This is useful for tools that don't include project file information in their output.
256+
257+
For example, given the following compiler output that doesn't include project file information:
258+
259+
```
260+
ClassLibrary.cs(16,24): warning CS0612: 'ClassLibrary.Helpers.MyHelper.Name' is obsolete
261+
```
262+
263+
A problem matcher with a default from path can be used:
264+
265+
```json
266+
{
267+
"problemMatcher": [
268+
{
269+
"owner": "csc-minimal",
270+
"fromPath": "ClassLibrary/ClassLibrary.csproj",
271+
"pattern": [
272+
{
273+
"regexp": "^(.+)\\((\\d+),(\\d+)\\): (error|warning) (.+): (.*)$",
274+
"file": 1,
275+
"line": 2,
276+
"column": 3,
277+
"severity": 4,
278+
"code": 5,
279+
"message": 6
280+
}
281+
]
282+
}
283+
]
284+
}
285+
```
286+
287+
This ensures that the file is rooted to the correct path when there's not enough information in the error messages to extract a `fromPath`.
288+
253289
#### Mitigate regular expression denial of service (ReDos)
254290

255291
If a matcher exceeds a 1 second timeout when processing a line, retry up to two three times total.

docs/adrs/1751-runner-job-hooks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ This feature is mainly intended for self hosted runner administrators.
2323
- `ACTIONS_RUNNER_HOOK_JOB_STARTED`
2424
- `ACTIONS_RUNNER_HOOK_JOB_COMPLETED`
2525

26-
You can set these variables to the **absolute** path of a a `.sh` or `.ps1` file.
26+
You can set these variables to the **absolute** path of a `.sh` or `.ps1` file.
2727

2828
We will execute `pwsh` (fallback to `powershell`) or `bash` (fallback to `sh`) as appropriate.
2929
- `.sh` files will execute with the args `-e {pathtofile}`

docs/checks/nodejs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
Make sure the built-in node.js has access to GitHub.com or GitHub Enterprise Server.
66

7-
The runner carries its own copy of node.js executable under `<runner_root>/externals/node20/`.
7+
The runner carries its own copies of node.js executables under `<runner_root>/externals/node20/` and `<runner_root>/externals/node24/`.
88

9-
All javascript base Actions will get executed by the built-in `node` at `<runner_root>/externals/node20/`.
9+
All javascript base Actions will get executed by the built-in `node` at either `<runner_root>/externals/node20/` or `<runner_root>/externals/node24/` depending on the version specified in the action's metadata.
1010

1111
> Not the `node` from `$PATH`
1212

docs/contribute.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Contributions
22

3-
We welcome contributions in the form of issues and pull requests. We view the contributions and the process as the same for github and external contributors.Please note the runner typically requires changes across the entire system and we aim for issues in the runner to be entirely self contained and fixable here. Therefore, we will primarily handle bug issues opened in this repo and we kindly request you to create all feature and enhancement requests on the [GitHub Feedback](https://github.com/community/community/discussions/categories/actions-and-packages) page.
3+
We welcome contributions in the form of issues and pull requests. We view the contributions and the process as the same for github and external contributors. Please note the runner typically requires changes across the entire system and we aim for issues in the runner to be entirely self contained and fixable here. Therefore, we will primarily handle bug issues opened in this repo and we kindly request you to create all feature and enhancement requests on the [GitHub Feedback](https://github.com/community/community/discussions/categories/actions-and-packages) page.
44

55
> IMPORTANT: Building your own runner is critical for the dev inner loop process when contributing changes. However, only runners built and distributed by GitHub (releases) are supported in production. Be aware that workflows and orchestrations run service side with the runner being a remote process to run steps. For that reason, the service can pull the runner forward so customizations can be lost.
66

images/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
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-jammy AS build
33

44
ARG TARGETOS
55
ARG TARGETARCH
66
ARG RUNNER_VERSION
7-
ARG RUNNER_CONTAINER_HOOKS_VERSION=0.6.1
8-
ARG DOCKER_VERSION=27.3.1
9-
ARG BUILDX_VERSION=0.18.0
7+
ARG RUNNER_CONTAINER_HOOKS_VERSION=0.7.0
8+
ARG DOCKER_VERSION=28.3.2
9+
ARG BUILDX_VERSION=0.26.1
1010

1111
RUN apt update -y && apt install curl unzip -y
1212

releaseNote.md

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,13 @@
11
## What's Changed
2-
3-
* Fix release workflow to use distinct artifact names by @ericsciple in https://github.com/actions/runner/pull/3485
4-
* Update dotnet sdk to latest version @6.0.425 by @github-actions in https://github.com/actions/runner/pull/3433
5-
* add ref and type to job completion in run service by @yaananth in https://github.com/actions/runner/pull/3492
6-
* Remove Broker Migration Message logging by @luketomlinson in https://github.com/actions/runner/pull/3493
7-
* Bump dotnet SDK to dotnet 8. by @TingluoHuang in https://github.com/actions/runner/pull/3500
8-
* Remove dotnet8 compatibility test. by @TingluoHuang in https://github.com/actions/runner/pull/3502
9-
* Remove node16 from the runner. by @TingluoHuang in https://github.com/actions/runner/pull/3503
10-
* send action name for run service by @yaananth in https://github.com/actions/runner/pull/3520
11-
* Handle runner not found by @ericsciple in https://github.com/actions/runner/pull/3536
12-
* Publish job telemetry to run-service. by @TingluoHuang in https://github.com/actions/runner/pull/3545
13-
* Fetch repo-level runner groups from API in v2 flow by @lucavallin in https://github.com/actions/runner/pull/3546
14-
* Allow runner to check service connection in background. by @TingluoHuang in https://github.com/actions/runner/pull/3542
15-
* Expose ENV for cache service v2. by @TingluoHuang in https://github.com/actions/runner/pull/3548
16-
* Update runner docker image. by @TingluoHuang in https://github.com/actions/runner/pull/3511
17-
* Bump Azure.Storage.Blobs from 12.19.1 to 12.23.0 in /src by @dependabot in https://github.com/actions/runner/pull/3549
18-
* fix dotnet-upgrade.yml to print right version by @TingluoHuang in https://github.com/actions/runner/pull/3550
19-
* Update dotnet sdk to latest version @8.0.404 by @github-actions in https://github.com/actions/runner/pull/3552
20-
* Configure dependabot to check github-actions updates by @Goooler in https://github.com/actions/runner/pull/3333
21-
* Bump actions/checkout from 3 to 4 by @dependabot in https://github.com/actions/runner/pull/3556
2+
* Try add orchestrationid into user-agent using token claim. by @TingluoHuang in https://github.com/actions/runner/pull/3945
3+
* Fix null reference exception in user agent handling by @salmanmkc in https://github.com/actions/runner/pull/3946
4+
* Runner Support for executing Node24 Actions by @salmanmkc in https://github.com/actions/runner/pull/3940
5+
* Update dotnet sdk to latest version @8.0.412 by @github-actions[bot] in https://github.com/actions/runner/pull/3941
226

237
## New Contributors
24-
* @lucavallin made their first contribution in https://github.com/actions/runner/pull/3546
25-
* @Goooler made their first contribution in https://github.com/actions/runner/pull/3333
8+
* @salmanmkc made their first contribution in https://github.com/actions/runner/pull/3946
269

27-
**Full Changelog**: https://github.com/actions/runner/compare/v2.320.0...v2.321.0
10+
**Full Changelog**: https://github.com/actions/runner/compare/v2.326.0...v2.327.0
2811

2912
_Note: Actions Runner follows a progressive release policy, so the latest release might not be available to your enterprise, organization, or repository yet.
3013
To confirm which version of the Actions Runner you should expect, please view the download instructions for your enterprise, organization, or repository.

0 commit comments

Comments
 (0)