Compare commits

..

4 Commits

Author SHA1 Message Date
Nikola Jokic
d8d2e74810 Bump packages (#304)
* Bump packages

* bump exec
2026-01-15 21:21:58 +01:00
Will Hopkins
5f5708a2b8 Overwrite runnner file commands (#298) 2025-12-12 13:57:47 +01:00
Nikola Jokic
f8e1cae677 Reduce the amount of data copied to the workflow pod (#293)
* run script copies back only runner file commands

* wip

* fix

* fmt

* user volume mount

* try doing only file commands

* typo

* remove _temp_pre

* Update packages/k8s/src/hooks/run-script-step.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update packages/k8s/src/hooks/run-script-step.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* better escape

* no useless escapes

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-10 21:49:35 +01:00
Nikola Jokic
996cc75daf Group dependabot updates (#289) 2025-12-10 21:49:27 +01:00
8 changed files with 1286 additions and 1550 deletions

28
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,28 @@
version: 2
updates:
# Group updates into a single PR per workspace package
- package-ecosystem: npm
directory: "/packages/docker"
schedule:
interval: weekly
groups:
all-dependencies:
patterns:
- "*"
- package-ecosystem: npm
directory: "/packages/hooklib"
schedule:
interval: weekly
groups:
all-dependencies:
patterns:
- "*"
- package-ecosystem: npm
directory: "/packages/k8s"
schedule:
interval: weekly
groups:
all-dependencies:
patterns:
- "*"

File diff suppressed because it is too large Load Diff

View File

@@ -13,8 +13,8 @@
"author": "", "author": "",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@actions/core": "^1.11.1", "@actions/core": "^2.0.2",
"@actions/exec": "^1.1.1", "@actions/exec": "^2.0.0",
"hooklib": "file:../hooklib", "hooklib": "file:../hooklib",
"shlex": "^3.0.0", "shlex": "^3.0.0",
"uuid": "^11.1.0" "uuid": "^11.1.0"

File diff suppressed because it is too large Load Diff

View File

@@ -22,6 +22,6 @@
"typescript": "^5.8.3" "typescript": "^5.8.3"
}, },
"dependencies": { "dependencies": {
"@actions/core": "^1.11.1" "@actions/core": "^2.0.2"
} }
} }

File diff suppressed because it is too large Load Diff

View File

@@ -13,9 +13,9 @@
"author": "", "author": "",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@actions/core": "^1.11.1", "@actions/core": "^2.0.2",
"@actions/exec": "^1.1.1", "@actions/exec": "^2.0.0",
"@actions/io": "^1.1.3", "@actions/io": "^2.0.0",
"@kubernetes/client-node": "^1.3.0", "@kubernetes/client-node": "^1.3.0",
"hooklib": "file:../hooklib", "hooklib": "file:../hooklib",
"js-yaml": "^4.1.0", "js-yaml": "^4.1.0",

View File

@@ -27,21 +27,15 @@ export async function runScriptStep(
const containerTemp = '/__w/_temp' const containerTemp = '/__w/_temp'
const containerTempSrc = '/__w/_temp_pre' const containerTempSrc = '/__w/_temp_pre'
// Ensure base and staging dirs exist before copying // Ensure base and staging dirs exist before copying
try { await execPodStep(
await execPodStep( [
[ 'sh',
'sh', '-c',
'-c', 'mkdir -p /__w && mkdir -p /__w/_temp && mkdir -p /__w/_temp_pre'
'mkdir -p /__w && mkdir -p /__w/_temp && mkdir -p /__w/_temp_pre' ],
], state.jobPod,
state.jobPod, JOB_CONTAINER_NAME
JOB_CONTAINER_NAME )
)
} catch (err) {
core.debug(
`Failed to create temp dirs in container: ${JSON.stringify(err)}`
)
}
await execCpToPod(state.jobPod, runnerTemp, containerTempSrc) await execCpToPod(state.jobPod, runnerTemp, containerTempSrc)
// Copy GitHub directories from temp to /github // Copy GitHub directories from temp to /github
@@ -54,9 +48,15 @@ export async function runScriptStep(
'SRC=/__w/_temp_pre', 'SRC=/__w/_temp_pre',
'DST=/__w/_temp', 'DST=/__w/_temp',
// Overwrite _runner_file_commands // Overwrite _runner_file_commands
'[ -d "$SRC/_runner_file_commands" ] && mkdir -p "$DST/_runner_file_commands" && cp -a "$SRC/_runner_file_commands/." "$DST/_runner_file_commands/" || true', 'cp -a "$SRC/_runner_file_commands/." "$DST/_runner_file_commands"',
// Append other files if missing `find "$SRC" -type f ! -path "*/_runner_file_commands/*" -exec sh -c '
'find "$SRC" -type f ! -path "*/_runner_file_commands/*" | while read -r f; do rel=${f#"$SRC/"}; target="$DST/$rel"; dir=$(dirname "$target"); if [ ! -e "$target" ]; then mkdir -p "$dir"; cp -a "$f" "$target"; fi; done' rel="\${1#$2/}"
target="$3/$rel"
mkdir -p "$(dirname "$target")"
cp -a "$1" "$target"
' _ {} "$SRC" "$DST" \\;`,
// Remove _temp_pre after merging
'rm -rf /__w/_temp_pre'
] ]
try { try {