mirror of
https://github.com/hanzoai/id.git
synced 2026-10-16 18:38:15 +00:00
ci(docker): compute version without node (ARC runner has no node)
The ARC runner image ships git+docker but not node, so the Compute-tags step's
`node -p "require('./package.json').version"` died with exit 127 (node: command
not found), skipping the build. Parse the version from package.json with
portable sed instead. Verified locally -> 0.1.23.
This commit is contained in:
@@ -24,8 +24,11 @@ jobs:
|
||||
- name: Compute tags
|
||||
id: tags
|
||||
run: |
|
||||
# The ARC runner image ships git + docker but NO node, so read the
|
||||
# version from package.json with portable shell (sed), not `node -p`.
|
||||
SHA="sha-$(git rev-parse --short HEAD)"
|
||||
VER="$(node -p "require('./package.json').version")"
|
||||
VER="$(sed -n 's/.*"version"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' package.json | head -1)"
|
||||
if [ -z "$VER" ]; then echo "could not parse version from package.json" >&2; exit 1; fi
|
||||
echo "sha=$SHA" >> "$GITHUB_OUTPUT"
|
||||
echo "ver=$VER" >> "$GITHUB_OUTPUT"
|
||||
echo "Tags: $SHA, $VER"
|
||||
|
||||
Reference in New Issue
Block a user