diff --git a/.github/workflows/script/update-node-modules.sh b/.github/workflows/script/update-node-modules.sh deleted file mode 100755 index 2a8a8d761d..0000000000 --- a/.github/workflows/script/update-node-modules.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -set -eu - -if [ "$1" != "update" ] && [ "$1" != "check-only" ]; then - >&2 echo "Failed: Invalid argument. Must be 'update' or 'check-only'" - exit 1 -fi - -npm install --force -g npm@9.2.0 - -# clean the npm cache to ensure we don't have any files owned by root -sudo npm cache clean --force - -if [ "$1" = "update" ]; then - npm install -fi - -# Reinstall modules and then clean to remove absolute paths -# Use 'npm ci' instead of 'npm install' as this is intended to be reproducible -npm ci diff --git a/.github/workflows/update-dependencies.yml b/.github/workflows/update-dependencies.yml index 0d24650e05..3e563bcde2 100644 --- a/.github/workflows/update-dependencies.yml +++ b/.github/workflows/update-dependencies.yml @@ -28,14 +28,14 @@ jobs: run: | git fetch origin "$BRANCH" --depth=1 git checkout "origin/$BRANCH" - .github/workflows/script/update-node-modules.sh update + npm ci + npm run build if [ ! -z "$(git status --porcelain)" ]; then git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" - git add node_modules - git commit -am "Update checked-in dependencies" + git commit -am "Update action bundles" git push origin "HEAD:$BRANCH" - echo "Pushed a commit to update the checked-in dependencies." \ + echo "Pushed a commit to update the checked-in action bundles." \ "Please mark the PR as ready for review to trigger PR checks." | gh pr comment --body-file - --repo github/codeql-action "${{ github.event.pull_request.number }}" gh pr ready --undo --repo github/codeql-action "${{ github.event.pull_request.number }}"