chore(package.json): Update dependencies and node version #529
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PR Workflow | |
on: | |
pull_request: | |
types: [opened, reopened, synchronize] | |
jobs: | |
linting_and_type-checking: | |
name: Linting, Formatting and Type checking | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: "yarn" | |
- name: Install dependencies | |
run: yarn workspaces focus -A | |
- name: Linting and Formatting checks | |
run: yarn run lint | |
- name: Type checking | |
run: yarn run typecheck | |
Check-Unauthorized-File-Changes: | |
name: Checks if no unauthorized files are changed | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Get Changed Unauthorized files | |
id: changed-unauth-files | |
uses: tj-actions/changed-files@v41 | |
with: | |
files: | | |
.github/** | |
.husky/** | |
.env.example | |
package.json | |
tsconfig.json | |
next.config.js | |
next-sitemap.config.js | |
next-env.d.ts | |
tailwind.config.js | |
postcss.config.js | |
yarn.lock | |
Dockerfile | |
CODEOWNERS | |
LICENSE | |
.gitignore | |
.gitmodules | |
.gitattributes | |
.eslintrc.js | |
.eslintignore | |
.zshrc | |
.prettierrc | |
.prettierignore | |
.dockerignore | |
makefile | |
- name: List all changed unauthorized files | |
if: steps.changed-unauth-files.outputs.any_changed == 'true' || steps.changed-unauth-files.outputs.any_deleted == 'true' | |
env: | |
CHANGED_UNAUTH_FILES: ${{ steps.changed-unauth-files.outputs.all_changed_files }} | |
run: | | |
for file in ${CHANGED_UNAUTH_FILES}; do | |
echo "$file is unauthorized to change/delete" | |
done | |
exit 1 | |
build: | |
name: Build check | |
runs-on: ubuntu-latest | |
needs: linting_and_type-checking | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: "yarn" | |
- name: Cache Next Build | |
uses: actions/cache@v4 | |
with: | |
path: | | |
${{ github.workspace }}/.next/cache | |
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }} | |
restore-keys: | | |
${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}- | |
- name: Install dependencies | |
run: yarn workspaces focus -A | |
- name: Build | |
run: yarn run build |