revert: remove unrelated changes to docker.ts, github.ts, image-tag.ts, versioning.test.ts

These files had changes unrelated to the Cloud Runner improvements PR goals.
Reverting to main branch state.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
frostebite
2026-01-29 18:03:40 +00:00
parent 19718602a0
commit 89733f108b
6 changed files with 9 additions and 34 deletions

View File

@@ -55,22 +55,12 @@ class Docker {
if (!existsSync(githubHome)) mkdirSync(githubHome);
const githubWorkflow = path.join(runnerTempPath, '_github_workflow');
if (!existsSync(githubWorkflow)) mkdirSync(githubWorkflow);
// Alpine-based images (alpine, rclone/rclone, etc.) don't have /bin/bash, only /bin/sh
const isAlpineBasedImage = image === 'alpine' || image.startsWith('rclone/');
const commandPrefix = isAlpineBasedImage ? `/bin/sh` : `/bin/bash`;
// Check if host.docker.internal is needed (for LocalStack access from containers)
// Add host mapping if any environment variable contains host.docker.internal
const environmentVariableString = ImageEnvironmentFactory.getEnvVarString(parameters, additionalVariables);
const needsHostMapping = /host\.docker\.internal/i.test(environmentVariableString);
const hostMappingFlag = needsHostMapping ? `--add-host=host.docker.internal:host-gateway` : '';
const commandPrefix = image === `alpine` ? `/bin/sh` : `/bin/bash`;
return `docker run \
--workdir ${dockerWorkspacePath} \
--rm \
${hostMappingFlag} \
${environmentVariableString} \
${ImageEnvironmentFactory.getEnvVarString(parameters, additionalVariables)} \
--env GITHUB_WORKSPACE=${dockerWorkspacePath} \
--env GIT_CONFIG_EXTENSIONS \
${gitPrivateToken ? `--env GIT_PRIVATE_TOKEN="${gitPrivateToken}"` : ''} \

View File

@@ -3,7 +3,6 @@ import CloudRunner from './cloud-runner/cloud-runner';
import CloudRunnerOptions from './cloud-runner/options/cloud-runner-options';
import * as core from '@actions/core';
import { Octokit } from '@octokit/core';
import fetch from 'node-fetch';
class GitHub {
private static readonly asyncChecksApiWorkflowName = `Async Checks API`;
@@ -16,13 +15,11 @@ class GitHub {
private static get octokitDefaultToken() {
return new Octokit({
auth: process.env.GITHUB_TOKEN,
request: { fetch },
});
}
private static get octokitPAT() {
return new Octokit({
auth: CloudRunner.buildParameters.gitPrivateToken,
request: { fetch },
});
}
private static get sha() {

View File

@@ -6,7 +6,7 @@ class ImageTag {
public targetPlatform: string;
public builderPlatform: string;
public customImage: string;
public imageRollingVersion: string;
public imageRollingVersion: number;
public imagePlatformPrefix: string;
constructor(imageProperties: { [key: string]: string }) {
@@ -38,7 +38,7 @@ class ImageTag {
providerStrategy,
);
this.imagePlatformPrefix = ImageTag.getImagePlatformPrefixes(buildPlatform);
this.imageRollingVersion = containerRegistryImageVersion; // Will automatically roll to the latest non-breaking version.
this.imageRollingVersion = Number(containerRegistryImageVersion); // Will automatically roll to the latest non-breaking version.
}
static get versionPattern(): RegExp {

View File

@@ -35,8 +35,7 @@ describe('Versioning', () => {
});
});
const maybeDescribe = process.platform === 'win32' ? describe.skip : describe;
maybeDescribe('grepCompatibleInputVersionRegex', () => {
describe('grepCompatibleInputVersionRegex', () => {
// eslint-disable-next-line unicorn/consistent-function-scoping
const matchInputUsingGrep = async (input: string) => {
const output = await System.run('sh', undefined, {