Skip to content

Commit

Permalink
Update npm.yml GitHub workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ms-bot committed Aug 3, 2023
1 parent 106d673 commit fff695f
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
# If changes are needed, update the action npm in
# https://github.com/mobsuccess-devops/github-mobsuccess-policy
on:
merge_group:
types:
- checks_requested
push:
branches: [master, preprod, prod]
pull_request:
Expand All @@ -16,6 +19,32 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: mobsuccess-devops/github-actions-packagejsonlint@master
sortpackagejson:
name: Sort Package Json
runs-on: ubuntu-20.04
timeout-minutes: 7
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.16.0
- name: Cache Node Modules
id: cache
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: ./node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }}-${{ hashFiles('**/package-lock.json') }}-node-16.16.0
- run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.MS_READ_PACKAGES_GITHUB_PAT }}" >> ~/.npmrc
name: Configure Credentials For GitHub Packages
- run: npm ci
if: steps.cache.outputs.cache-hit != 'true'
working-directory: .
- run: |
echo "💡 👉 Check not passing? see the doc at https://www.notion.so/mobsuccess/sort-package-json-de5cf4648e8545dbb5a2a5a910380535"
npx --yes [email protected] --check
working-directory: .
prettier:
name: Prettier
runs-on: ubuntu-20.04
Expand Down

0 comments on commit fff695f

Please sign in to comment.