chore(ci): Harden Workflows And Pin Actions
This commit is contained in:
@@ -4,6 +4,9 @@ on:
|
||||
pull_request:
|
||||
branches: [master]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
@@ -15,19 +18,14 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
- name: Install Prettier
|
||||
run: |
|
||||
rm package.json
|
||||
rm package-lock.json
|
||||
npm init -y
|
||||
npm install prettier@3.2.5
|
||||
node-version: '24'
|
||||
|
||||
- name: Check Code Formatting
|
||||
run: npx prettier --check "./src/**/*.{ts,tsx,js,css}"
|
||||
run: npx --yes prettier@3.2.5 --check "./src/**/*.{ts,tsx,js,css}"
|
||||
|
||||
Reference in New Issue
Block a user