From 4a522abe683b4ea1d057812083245c3880c65a8e Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Tue, 2 Apr 2024 20:43:20 +0200 Subject: [PATCH] ci: update of files from global .github repo (#510) --- .github/workflows/if-nodejs-pr-testing.yml | 7 ++++--- .github/workflows/if-nodejs-release.yml | 10 +++++++++- .github/workflows/if-nodejs-version-bump.yml | 2 +- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/if-nodejs-pr-testing.yml b/.github/workflows/if-nodejs-pr-testing.yml index 691f8350..75eaaac7 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 @@ -75,4 +76,4 @@ jobs: run: npm run lint --if-present - if: steps.packagejson.outputs.exists == 'true' name: Run release assets generation to make sure PR does not break it - run: npm run generate:assets --if-present \ No newline at end of file + run: npm run generate:assets --if-present diff --git a/.github/workflows/if-nodejs-release.yml b/.github/workflows/if-nodejs-release.yml index 4938a37d..fbad21df 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 7e27f90b..36847d80 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