build(deps): bump ip from 2.0.0 to 2.0.1 #53
Workflow file for this run
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: Commitlint | |
on: [pull_request] | |
jobs: | |
lint-commits: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # Ensures commit history is fetched | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "18" # Specify a Node.js version | |
- name: Install dependencies | |
run: npm install | |
env: | |
GH_NPM_TOKEN: ${{ secrets.GH_NPM_TOKEN }} | |
- name: Lint last commit message | |
run: npx commitlint --from=${{ github.event.pull_request.base.sha }} --to=${{ github.event.pull_request.head.sha }} --verbose | |
- name: Run Prettier | |
run: lerna run prettify | |
- name: Run ESLint | |
run: lerna run lint | |
- name: Commit and push if changes | |
run: | | |
git config --global user.name 'GitHub Action' | |
git config --global user.email '[email protected]' | |
# Check out the branch | |
git fetch | |
git checkout ${{ github.head_ref }} | |
# Add, commit, and push changes | |
git add -A | |
git diff --staged --quiet || git commit -m "Apply Prettier formatting" | |
git push origin ${{ github.head_ref }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |