From d1ef99d62dc844c5e1e21395cf0161a546a856e4 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Tue, 2 Apr 2024 18:44:10 +0000 Subject: [PATCH 1/2] ci: update of files from global .github repo --- .github/workflows/if-nodejs-release.yml | 10 +++++++++- .github/workflows/if-nodejs-version-bump.yml | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/if-nodejs-release.yml b/.github/workflows/if-nodejs-release.yml index 4938a37..fbad21d 100644 --- a/.github/workflows/if-nodejs-release.yml +++ b/.github/workflows/if-nodejs-release.yml @@ -85,6 +85,7 @@ jobs: - name: Check if Node.js project and has package.json id: packagejson run: test -e ./package.json && echo "exists=true" >> $GITHUB_OUTPUT || echo "exists=false" >> $GITHUB_OUTPUT + shell: bash - if: steps.packagejson.outputs.exists == 'true' name: Check package-lock version uses: asyncapi/.github/.github/actions/get-node-version-from-package-lock@master @@ -98,7 +99,14 @@ jobs: cache-dependency-path: '**/package-lock.json' - if: steps.packagejson.outputs.exists == 'true' name: Install dependencies - run: npm install + id: first-installation + run: npm ci + continue-on-error: true + - if: steps.first-installation.outputs.status == 'failure' && steps.packagejson.outputs.exists == 'true' + name: Clear NPM cache and install deps again + run: | + npm cache clean --force + npm ci - if: steps.packagejson.outputs.exists == 'true' name: Add plugin for conventional commits for semantic-release run: npm install --save-dev conventional-changelog-conventionalcommits@5.0.0 diff --git a/.github/workflows/if-nodejs-version-bump.yml b/.github/workflows/if-nodejs-version-bump.yml index 7e27f90..36847d8 100644 --- a/.github/workflows/if-nodejs-version-bump.yml +++ b/.github/workflows/if-nodejs-version-bump.yml @@ -37,7 +37,7 @@ jobs: cache-dependency-path: '**/package-lock.json' - if: steps.packagejson.outputs.exists == 'true' name: Install dependencies - run: npm install + run: npm ci - if: steps.packagejson.outputs.exists == 'true' name: Assets generation run: npm run generate:assets --if-present From f09368abc881eb64feef4eb639ff95c7e39e3dd0 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Tue, 2 Apr 2024 18:45:19 +0000 Subject: [PATCH 2/2] ci: update of files from global .github repo --- .github/workflows/if-nodejs-pr-testing.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/if-nodejs-pr-testing.yml b/.github/workflows/if-nodejs-pr-testing.yml index 9ce9f9a..75eaaac 100644 --- a/.github/workflows/if-nodejs-pr-testing.yml +++ b/.github/workflows/if-nodejs-pr-testing.yml @@ -33,6 +33,7 @@ jobs: id: should_run name: Should Run run: echo "shouldrun=true" >> $GITHUB_OUTPUT + shell: bash - if: steps.should_run.outputs.shouldrun == 'true' name: Set git to use LF #to once and for all finish neverending fight between Unix and Windows run: | @@ -60,13 +61,13 @@ jobs: - if: steps.packagejson.outputs.exists == 'true' name: Install dependencies id: first-installation - run: npm install --loglevel verbose + run: npm ci continue-on-error: true - if: steps.first-installation.outputs.status == 'failure' && steps.packagejson.outputs.exists == 'true' name: Clear NPM cache and install deps again run: | npm cache clean --force - npm install --loglevel verbose + npm ci - if: steps.packagejson.outputs.exists == 'true' name: Test run: npm test --if-present