Skip to content

Commit a872d80

Browse files
committed
ci(release): restore release and local lint commit path
1 parent 2bf50be commit a872d80

4 files changed

Lines changed: 25 additions & 3 deletions

File tree

.github/workflows/release-candidate.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
outputs:
2424
image_ref: ${{ steps.build.outputs.image_ref }}
2525
steps:
26+
- uses: actions/checkout@64ffef1ea610c4052efefeb955034987fb104bc4 # v4
2627
- uses: ./.github/actions/repo-checkout
2728
- name: Login to GHCR
2829
env:
@@ -51,6 +52,7 @@ jobs:
5152
needs: build_ci_image
5253
runs-on: ubuntu-latest
5354
steps:
55+
- uses: actions/checkout@64ffef1ea610c4052efefeb955034987fb104bc4 # v4
5456
- uses: ./.github/actions/repo-checkout
5557
- name: Docs gate
5658
env:
@@ -61,6 +63,7 @@ jobs:
6163
needs: build_ci_image
6264
runs-on: ubuntu-latest
6365
steps:
66+
- uses: actions/checkout@64ffef1ea610c4052efefeb955034987fb104bc4 # v4
6467
- uses: ./.github/actions/repo-checkout
6568
- name: Root typecheck gate
6669
env:
@@ -71,6 +74,7 @@ jobs:
7174
needs: build_ci_image
7275
runs-on: ubuntu-latest
7376
steps:
77+
- uses: actions/checkout@64ffef1ea610c4052efefeb955034987fb104bc4 # v4
7478
- uses: ./.github/actions/repo-checkout
7579
- name: Release security scan
7680
env:
@@ -90,6 +94,7 @@ jobs:
9094
attestations: write
9195
artifact-metadata: write
9296
steps:
97+
- uses: actions/checkout@64ffef1ea610c4052efefeb955034987fb104bc4 # v4
9398
- uses: ./.github/actions/repo-checkout
9499
- name: Release candidate gate (containerized)
95100
env:

scripts/ci/lint-all.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,31 @@ run_backend_lint() {
8282
install_workspace_deps_serialized() {
8383
local lock_root=".runtime-cache/locks"
8484
local lock_dir="${lock_root}/lint-all-workspace-install.lock.d"
85+
local lock_pid_file="${lock_dir}/pid"
8586
mkdir -p "$lock_root"
8687

8788
while ! mkdir "$lock_dir" 2>/dev/null; do
89+
if [[ -f "$lock_pid_file" ]]; then
90+
local holder_pid=""
91+
holder_pid="$(cat "$lock_pid_file" 2>/dev/null || true)"
92+
if [[ -n "$holder_pid" ]] && ! kill -0 "$holder_pid" >/dev/null 2>&1; then
93+
rm -f "$lock_pid_file" 2>/dev/null || true
94+
rmdir "$lock_dir" 2>/dev/null || true
95+
continue
96+
fi
97+
elif [[ -d "$lock_dir" ]]; then
98+
rmdir "$lock_dir" 2>/dev/null || true
99+
if [[ ! -d "$lock_dir" ]]; then
100+
continue
101+
fi
102+
fi
88103
sleep 1
89104
done
105+
printf '%s\n' "$$" >"$lock_pid_file"
90106

91107
echo "[lint-all] installing workspace deps under lock..."
92108
CI=true pnpm install --frozen-lockfile || CI=true pnpm install --no-frozen-lockfile
109+
rm -f "$lock_pid_file" 2>/dev/null || true
93110
rmdir "$lock_dir" 2>/dev/null || true
94111
}
95112

scripts/ci/pre-commit-required-gates.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ run_gate_with_container_toggle() {
155155

156156
run_lint_gate_with_container_fallback() {
157157
local log_file
158-
log_file="$(mktemp "${TMPDIR:-/tmp}/prooftrail-precommit-lint.XXXXXX.log")"
158+
log_file="$(mktemp "${TMPDIR:-/tmp}/prooftrail-precommit-lint.XXXXXX")"
159159
trap 'rm -f "$log_file"' RETURN
160160

161161
echo "[pre-commit-required] lint-all-container"

scripts/ci/run-in-container.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,11 +337,11 @@ run_task_in_container() {
337337
chmod u+rwx "$artifact_dir" 2>/dev/null || true
338338
fi
339339
bootstrap_cmd="$(cat <<EOF
340-
export PATH="\$HOME/.local/bin:\$PATH"; corepack enable >/dev/null 2>&1 || true; corepack prepare pnpm@10.22.0 --activate >/dev/null 2>&1 || true; mkdir -p "\$HOME/.local/bin" "\$HOME/.local/share/uv"; cat > "\$HOME/.local/bin/pnpm" <<'EOF_PNPM'
340+
export PATH="\$HOME/.local/bin:\$PATH"; mkdir -p "\$HOME/.local/bin" "\$HOME/.local/share/uv"; npm install --prefix "\$HOME/.local" -g pnpm@10.22.0 >/dev/null 2>&1 || { corepack enable >/dev/null 2>&1 || true; corepack prepare pnpm@10.22.0 --activate >/dev/null 2>&1 || true; cat > "\$HOME/.local/bin/pnpm" <<'EOF_PNPM'
341341
#!/usr/bin/env bash
342342
exec corepack pnpm "\$@"
343343
EOF_PNPM
344-
chmod +x "\$HOME/.local/bin/pnpm"; if ! command -v uv >/dev/null 2>&1; then curl -LsSf https://astral.sh/uv/install.sh | sh >/dev/null 2>&1 || true; fi; mkdir -p "${WORKDIR}/.runtime-cache/artifacts/ci"
344+
chmod +x "\$HOME/.local/bin/pnpm"; }; if ! command -v uv >/dev/null 2>&1; then curl -LsSf https://astral.sh/uv/install.sh | sh >/dev/null 2>&1 || true; fi; mkdir -p "${WORKDIR}/.runtime-cache/artifacts/ci"
345345
EOF
346346
)"
347347
local -a env_args=(

0 commit comments

Comments
 (0)