Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion images/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ARG TARGETOS
ARG TARGETARCH
ARG RUNNER_VERSION
ARG RUNNER_CONTAINER_HOOKS_VERSION=0.7.0
ARG DOCKER_VERSION=29.6.0
ARG DOCKER_VERSION=29.6.1
ARG BUILDX_VERSION=0.35.0

RUN apt update -y && apt install curl unzip -y
Expand Down
2 changes: 1 addition & 1 deletion patches/last_processed_commit.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
c814d7ca46f403a860f84c4e54b78c5a2d17e045
dde968bf5724d5b9ba7a759f9a114a305e2c76e7
6 changes: 3 additions & 3 deletions patches/runner-main-sdk8-ppc64le.patch
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ index 9c069b12..d26b0dc2 100644
<!-- Set TRACE/DEBUG vars -->
<PropertyGroup>
diff --git a/src/Misc/externals.sh b/src/Misc/externals.sh
index 46384bb4..fc2a9456 100755
index 4947a9bd..8103a2db 100755
--- a/src/Misc/externals.sh
+++ b/src/Misc/externals.sh
@@ -187,3 +187,13 @@ fi
Expand Down Expand Up @@ -86,7 +86,7 @@ index 14cc6bab..c8ed8b92 100755

if ! [ -x "$(command -v ldconfig)" ]; then
diff --git a/src/Runner.Common/Constants.cs b/src/Runner.Common/Constants.cs
index 8536e942..070a8004 100644
index 9debaddc..db1d7c5c 100644
--- a/src/Runner.Common/Constants.cs
+++ b/src/Runner.Common/Constants.cs
@@ -59,7 +59,9 @@ namespace GitHub.Runner.Common
Expand Down Expand Up @@ -284,4 +284,4 @@ index 056a312e..3f9a3679 100644
<Exec Command="%22$(DesktopMSBuild)%22 Runner.Service/Windows/RunnerService.csproj /p:Configuration=$(BUILDCONFIG) /p:PackageRuntime=$(PackageRuntime) /p:OutputPath=%22$(MSBuildProjectDirectory)/../_layout/bin%22" ConsoleToMSBuild="true" Condition="'$(PackageRuntime)' == 'win-x64' Or '$(PackageRuntime)' == 'win-x86' Or '$(PackageRuntime)' == 'win-arm64'" />
</Target>

# From upstream commit: c814d7ca46f403a860f84c4e54b78c5a2d17e045
# From upstream commit: dde968bf5724d5b9ba7a759f9a114a305e2c76e7
6 changes: 3 additions & 3 deletions patches/runner-main-sdk8-s390x.patch
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ index 9c069b12..d26b0dc2 100644
<!-- Set TRACE/DEBUG vars -->
<PropertyGroup>
diff --git a/src/Misc/externals.sh b/src/Misc/externals.sh
index 46384bb4..fc2a9456 100755
index 4947a9bd..8103a2db 100755
--- a/src/Misc/externals.sh
+++ b/src/Misc/externals.sh
@@ -187,3 +187,13 @@ fi
Expand Down Expand Up @@ -86,7 +86,7 @@ index 14cc6bab..c8ed8b92 100755

if ! [ -x "$(command -v ldconfig)" ]; then
diff --git a/src/Runner.Common/Constants.cs b/src/Runner.Common/Constants.cs
index 8536e942..070a8004 100644
index 9debaddc..db1d7c5c 100644
--- a/src/Runner.Common/Constants.cs
+++ b/src/Runner.Common/Constants.cs
@@ -59,7 +59,9 @@ namespace GitHub.Runner.Common
Expand Down Expand Up @@ -284,4 +284,4 @@ index 056a312e..3f9a3679 100644
<Exec Command="%22$(DesktopMSBuild)%22 Runner.Service/Windows/RunnerService.csproj /p:Configuration=$(BUILDCONFIG) /p:PackageRuntime=$(PackageRuntime) /p:OutputPath=%22$(MSBuildProjectDirectory)/../_layout/bin%22" ConsoleToMSBuild="true" Condition="'$(PackageRuntime)' == 'win-x64' Or '$(PackageRuntime)' == 'win-x86' Or '$(PackageRuntime)' == 'win-arm64'" />
</Target>

# From upstream commit: c814d7ca46f403a860f84c4e54b78c5a2d17e045
# From upstream commit: dde968bf5724d5b9ba7a759f9a114a305e2c76e7
2 changes: 1 addition & 1 deletion src/Misc/externals.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ NODE_ALPINE_URL=https://github.com/actions/alpine_nodejs/releases/download
# When you update Node versions you must also create a new release of alpine_nodejs at that updated version.
# Follow the instructions here: https://github.com/actions/alpine_nodejs?tab=readme-ov-file#getting-started
NODE20_VERSION="20.20.2"
NODE24_VERSION="24.17.0"
NODE24_VERSION="24.18.0"

get_abs_path() {
# exploits the fact that pwd will print abs path when no args
Expand Down
1 change: 1 addition & 0 deletions src/Runner.Common/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ public static class Features
public static readonly string BatchActionResolution = "actions_batch_action_resolution";
public static readonly string UseBearerTokenForCodeload = "actions_use_bearer_token_for_codeload";
public static readonly string OverrideDebuggerWelcomeMessage = "actions_runner_override_debugger_welcome_message";
public static readonly string SelfRepository = "actions_self_repository";
}

// Node version migration related constants
Expand Down
278 changes: 261 additions & 17 deletions src/Runner.Worker/ActionManager.cs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,18 @@ public static List<Step> ConvertToSteps(
break;
case ActionSourceType.Repository:
var repositoryReference = step.Reference as RepositoryPathReference;
name = !String.IsNullOrEmpty(repositoryReference.Name) ? repositoryReference.Name : PipelineConstants.SelfAlias;
if (!String.IsNullOrEmpty(repositoryReference.Name))
{
name = repositoryReference.Name;
}
else if (String.Equals(repositoryReference.RepositoryType, PipelineConstants.SelfRepositoryAlias, StringComparison.OrdinalIgnoreCase))
{
name = PipelineConstants.SelfRepositoryAlias;
}
else
{
name = PipelineConstants.SelfAlias;
}
break;
}

Expand Down Expand Up @@ -600,6 +611,14 @@ private static ActionStep ConvertToStep(
Path = uses.Value
};
}
else if (PipelineConstants.TryParseSelfRepository(uses.Value, out var selfPath))
{
result.Reference = new RepositoryPathReference
{
RepositoryType = PipelineConstants.SelfRepositoryAlias,
Path = selfPath
};
}
else
{
var usesSegments = uses.Value.Split('@');
Expand Down
35 changes: 34 additions & 1 deletion src/Sdk/DTPipelines/Pipelines/PipelineConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,43 @@ public static class PipelineConstants
public static readonly Int32 MaxNodeNameLength = 100;

/// <summary>
/// Alias for the self repository.
/// Alias for the self local-workspace repository type (./ syntax).
/// Resolves to the local checkout on the runner.
/// </summary>
public static readonly String SelfAlias = "self";

/// <summary>
/// RepositoryType for self-repository references ($/ syntax).
/// Resolves to "this repo, at this SHA" based on the containing YAML file.
/// </summary>
public static readonly String SelfRepositoryAlias = "selfRepository";

/// <summary>
/// The prefix for self-repository references in uses: values.
/// </summary>
public const String SelfRepositoryPrefix = "$/";

/// <summary>
/// Returns true if the uses value is a self-repository reference (starts with $/),
/// and outputs the subpath after the prefix.
/// </summary>
public static bool TryParseSelfRepository(string usesValue, out string path)
{
if (usesValue != null && usesValue.StartsWith(SelfRepositoryPrefix, StringComparison.Ordinal))
{
path = usesValue.Substring(SelfRepositoryPrefix.Length).TrimStart('/');
if (string.IsNullOrEmpty(path))
{
path = null;
return false;
}
return true;
}

path = null;
return false;
}

/// <summary>
/// Error code during graph validation.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1605,6 +1605,10 @@ public static List<IStep> ConvertToSteps(
{
id = WorkflowConstants.SelfAlias;
}
else if (GitHub.DistributedTask.Pipelines.PipelineConstants.TryParseSelfRepository(action.Uses!.Value, out _))
{
id = WorkflowConstants.SelfRepositoryAlias;
}
else
{
var usesSegments = action.Uses!.Value.Split('@');
Expand Down
7 changes: 6 additions & 1 deletion src/Sdk/WorkflowParser/WorkflowConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,15 @@ public static class WorkflowConstants
internal const Int32 MaxNodeNameLength = 100;

/// <summary>
/// Alias for the self repository.
/// Alias for the self local-workspace repository type (./ syntax).
/// </summary>
internal const String SelfAlias = "self";

/// <summary>
/// RepositoryType for self-repository references ($/ syntax).
/// </summary>
internal const String SelfRepositoryAlias = "selfRepository";

public static class PermissionsPolicy
{
public const string LimitedRead = "LimitedRead";
Expand Down
Loading
Loading