From 1e357465e65db90f17e501b5ae44709f227913fe Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Wed, 27 Nov 2024 00:38:03 +0100 Subject: [PATCH] tools: fix nghttp3 updater script --- .github/workflows/tools.yml | 2 +- .github/workflows/update-wpt.yml | 2 +- tools/dep_updaters/update-nghttp3.sh | 11 ++++++----- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tools.yml b/.github/workflows/tools.yml index 7cd0c496c6ca68..04c46541546ece 100644 --- a/.github/workflows/tools.yml +++ b/.github/workflows/tools.yml @@ -51,7 +51,7 @@ permissions: jobs: tools-deps-update: - if: github.repository == 'nodejs/node' + if: github.repository == 'nodejs/node' || github.event_name == 'workflow_dispatch' runs-on: ubuntu-latest strategy: fail-fast: false # Prevent other jobs from aborting if one fails diff --git a/.github/workflows/update-wpt.yml b/.github/workflows/update-wpt.yml index a7cdd07a093a2d..71cd1bab487735 100644 --- a/.github/workflows/update-wpt.yml +++ b/.github/workflows/update-wpt.yml @@ -46,7 +46,7 @@ jobs: ncu-config set owner "${GITHUB_REPOSITORY_OWNER}" ncu-config set repo "$(echo "$GITHUB_REPOSITORY" | cut -d/ -f2)" env: - USERNAME: ${{ secrets.JENKINS_USER || github.actor }} + USERNAME: ${{ secrets.JENKINS_USER }} GH_TOKEN: ${{ secrets.GH_USER_TOKEN }} - name: Update WPT for subsystem ${{ matrix.subsystem }} diff --git a/tools/dep_updaters/update-nghttp3.sh b/tools/dep_updaters/update-nghttp3.sh index 50a17e32f8a291..9e8e708066fb58 100755 --- a/tools/dep_updaters/update-nghttp3.sh +++ b/tools/dep_updaters/update-nghttp3.sh @@ -42,15 +42,16 @@ cleanup () { trap cleanup INT TERM EXIT NGHTTP3_REF="v$NEW_VERSION" -NGHTTP3_ZIP="nghttp3-$NEW_VERSION" +NGHTTP3_ZIP="nghttp3-${NEW_VERSION}" cd "$WORKSPACE" echo "Fetching nghttp3 source archive..." -curl -sL -o "$NGHTTP3_ZIP.zip" "https://github.com/ngtcp2/nghttp3/archive/refs/tags/$NGHTTP3_REF.zip" -log_and_verify_sha256sum "nghttp3" "$NGHTTP3_ZIP.zip" -unzip "$NGHTTP3_ZIP.zip" -rm "$NGHTTP3_ZIP.zip" +curl -sL -o "$NGHTTP3_ZIP.tar.xz" "https://github.com/ngtcp2/nghttp3/releases/download/v${NEW_VERSION}/${NGHTTP3_ZIP}.tar.xz" +SHA256="$(curl -sL "https://github.com/ngtcp2/nghttp3/releases/download/v${NEW_VERSION}/checksums.txt" | grep 'tar.xz$')" +log_and_verify_sha256sum "nghttp3" "$NGHTTP3_ZIP.tar.xz" "$SHA256" +tar -xJf "$NGHTTP3_ZIP.tar.xz" +rm "$NGHTTP3_ZIP.tar.xz" mv "$NGHTTP3_ZIP" nghttp3 cd nghttp3