Compare commits

..

7 Commits

Author SHA1 Message Date
Nikola Jokic
55d6468aad typo 2025-12-05 18:08:45 +01:00
Nikola Jokic
8ffe11eaac try doing only file commands 2025-12-05 16:57:56 +01:00
Nikola Jokic
170b03ac01 user volume mount 2025-12-05 13:26:17 +01:00
Nikola Jokic
bed5615e7b fmt 2025-12-04 21:18:17 +01:00
Nikola Jokic
fdf0659b76 fix 2025-12-04 16:17:11 +01:00
Nikola Jokic
9da01d74f1 wip 2025-11-28 17:48:00 +01:00
Nikola Jokic
4b388a89bb run script copies back only runner file commands 2025-11-28 16:11:29 +01:00
4 changed files with 428 additions and 377 deletions

View File

@@ -1,28 +0,0 @@
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

@@ -14,20 +14,20 @@
"license": "MIT",
"dependencies": {
"@actions/core": "^1.11.1",
"@actions/exec": "^2.0.0",
"@actions/exec": "^1.1.1",
"hooklib": "file:../hooklib",
"shlex": "^3.0.0",
"uuid": "^13.0.0"
"uuid": "^11.1.0"
},
"devDependencies": {
"@babel/core": "^7.28.5",
"@babel/preset-env": "^7.28.5",
"@babel/core": "^7.25.2",
"@babel/preset-env": "^7.25.4",
"@types/jest": "^30.0.0",
"@types/node": "^24.0.14",
"@typescript-eslint/parser": "^8.49.0",
"@typescript-eslint/parser": "^8.37.0",
"@vercel/ncc": "^0.38.3",
"jest": "^30.0.4",
"ts-jest": "^29.4.6",
"ts-jest": "^29.4.0",
"ts-node": "^10.9.2",
"tsconfig-paths": "^4.2.0",
"typescript": "^5.8.3"

View File

@@ -27,15 +27,21 @@ export async function runScriptStep(
const containerTemp = '/__w/_temp'
const containerTempSrc = '/__w/_temp_pre'
// Ensure base and staging dirs exist before copying
await execPodStep(
[
'sh',
'-c',
'mkdir -p /__w && mkdir -p /__w/_temp && mkdir -p /__w/_temp_pre'
],
state.jobPod,
JOB_CONTAINER_NAME
)
try {
await execPodStep(
[
'sh',
'-c',
'mkdir -p /__w && mkdir -p /__w/_temp && mkdir -p /__w/_temp_pre'
],
state.jobPod,
JOB_CONTAINER_NAME
)
} catch (err) {
core.debug(
`Failed to create temp dirs in container: ${JSON.stringify(err)}`
)
}
await execCpToPod(state.jobPod, runnerTemp, containerTempSrc)
// Copy GitHub directories from temp to /github
@@ -48,14 +54,9 @@ export async function runScriptStep(
'SRC=/__w/_temp_pre',
'DST=/__w/_temp',
// Overwrite _runner_file_commands
`find "$SRC" -type f ! -path "*/_runner_file_commands/*" -exec sh -c '
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'
'[ -d "$SRC/_runner_file_commands" ] && mkdir -p "$DST/_runner_file_commands" && cp -a "$SRC/_runner_file_commands/." "$DST/_runner_file_commands/" || true',
// Append other files if missing
'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'
]
try {