mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
tools: avoid swallowing errors in GHA
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com> PR-URL: https://github.com/nodejs/node/pull/67548 Reviewed-By: Tierney Cyren <hello@bnb.im> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
3 files changed
+17
-5
No files matched your search
@@ -57,7 +57,8 @@ jobs:
|
||||
[ -z "$FILTER" ] || FILTER_IF_SET=" / $FILTER"
|
||||
COMMENT_BODY="Benchmark GHA (${CATEGORIES}${FILTER_IF_SET}): ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
|
||||
echo "COMMENT_BODY=$COMMENT_BODY" >> "$GITHUB_OUTPUT"
|
||||
echo "COMMENT_URL=$(gh pr comment -R "${REPO:-$GITHUB_REPOSITORY}" "$PR_ID" --body "$COMMENT_BODY")" >> "$GITHUB_OUTPUT"
|
||||
COMMENT_URL=$(gh pr comment -R "${REPO:-$GITHUB_REPOSITORY}" "$PR_ID" --body "$COMMENT_BODY")
|
||||
echo "COMMENT_URL=$COMMENT_URL" >> "$GITHUB_OUTPUT"
|
||||
env:
|
||||
CATEGORIES: ${{ inputs.category }}
|
||||
FILTER: ${{ inputs.filter }}
|
||||
|
||||
@@ -27,9 +27,19 @@ jobs:
|
||||
matrix: ${{ steps.query.outputs.matrix }}
|
||||
steps:
|
||||
- id: query
|
||||
# Explicit bash enables pipefail so jq cannot hide a failed curl.
|
||||
shell: bash
|
||||
run: |
|
||||
matrix=$(curl -s https://raw.githubusercontent.com/nodejs/Release/refs/heads/main/schedule.json | jq -c --arg now "$(date +%Y-%m-%d)" '[with_entries(select(.value.end > $now and .value.start < $now)) | keys[] | ltrimstr("v") | tonumber] + ["latest-nightly"]')
|
||||
echo "matrix=$matrix" >> "$GITHUB_OUTPUT"
|
||||
{
|
||||
printf 'matrix='
|
||||
curl -fsSL https://github.com/nodejs/Release/raw/HEAD/schedule.json \
|
||||
| jq -Mrc --arg now "$(date +%Y-%m-%d)" '
|
||||
[
|
||||
with_entries(select(.value.end > $now and .value.start < $now))
|
||||
| keys[]
|
||||
| ltrimstr("v") | tonumber
|
||||
] + ["latest-nightly"]'
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
report:
|
||||
needs:
|
||||
- collect-versions
|
||||
|
||||
@@ -230,14 +230,15 @@ jobs:
|
||||
- name: Collect matrix of support OpenSSL versions
|
||||
id: query
|
||||
run: |
|
||||
echo "matrix=$(
|
||||
{
|
||||
printf 'matrix='
|
||||
nix-instantiate --eval --strict --json -E "
|
||||
let
|
||||
matrix = import $TAR_DIR/tools/nix/openssl-matrix.nix {};
|
||||
in
|
||||
builtins.map (attr: { inherit attr; inherit (builtins.getAttr attr matrix) name; }) (builtins.attrNames matrix)
|
||||
"
|
||||
)" >> "$GITHUB_OUTPUT"
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
|
||||
# Builds and tests Node.js with shared libraries against every supported
|
||||
# OpenSSL release version available in the repo-pinned nixpkgs. The default
|
||||
|
||||
Reference in new issue
Block a user