forked from BoscoDomingo/typescript-skeleton
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ci): add missing pnpm install step
- Loading branch information
1 parent
0c8fb30
commit 815ba93
Showing
2 changed files
with
61 additions
and
51 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,56 @@ | ||
name: Format code | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- develop | ||
|
||
jobs: | ||
format: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
# To commit and push the changed files | ||
contents: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: ".nvmrc" | ||
cache: "pnpm" | ||
|
||
# Alternative | ||
# - name: Cache node modules | ||
# uses: actions/cache@v3 | ||
# env: | ||
# cache-name: cache-node-modules | ||
# with: | ||
# path: ~/.pnpm-store | ||
# key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
# restore-keys: | | ||
# ${{ runner.os }}-build-${{ env.cache-name }}- | ||
# ${{ runner.os }}-build- | ||
# ${{ runner.os }}- | ||
|
||
- name: Install Dependencies | ||
run: pnpm i --frozen-lockfile | ||
|
||
- name: Run format | ||
run: pnpm format | ||
|
||
# Source: https://github.com/marketplace/actions/git-auto-commit | ||
- id: auto-commit-changes | ||
name: "Auto commit changes" | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: "style(auto): formatting" | ||
skip_dirty_check: false | ||
name: Format code | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- develop | ||
|
||
jobs: | ||
format: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
# To commit and push the changed files | ||
contents: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
|
||
- uses: pnpm/action-setup@v4 | ||
name: Install pnpm | ||
with: | ||
version: latest | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: ".nvmrc" | ||
cache: "pnpm" | ||
|
||
# Alternative | ||
# - name: Cache node modules | ||
# uses: actions/cache@v3 | ||
# env: | ||
# cache-name: cache-node-modules | ||
# with: | ||
# path: ~/.pnpm-store | ||
# key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
# restore-keys: | | ||
# ${{ runner.os }}-build-${{ env.cache-name }}- | ||
# ${{ runner.os }}-build- | ||
# ${{ runner.os }}- | ||
|
||
- name: Install Dependencies | ||
run: pnpm i --frozen-lockfile | ||
|
||
- name: Run format | ||
run: pnpm format | ||
|
||
# Source: https://github.com/marketplace/actions/git-auto-commit | ||
- id: auto-commit-changes | ||
name: "Auto commit changes" | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: "style(auto): formatting" | ||
skip_dirty_check: false |
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