Skip to content

[#196] Fix an issue with path replace #83

[#196] Fix an issue with path replace

[#196] Fix an issue with path replace #83

name: 'Pull Request: Default'
on:
pull_request:
branches:
- 'main'
env:
NODE_ENV: 'test'
jobs:
check_for_bot:
name: "Check for bot"
runs-on: ubuntu-latest
outputs:
is_bot: ${{ steps.bot.outputs.is_bot }}
steps:
- name: "[Check] Bot"
id: bot
run: |
if [[ ${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} == bot-* ]]; then
echo "Bot detected. Skipping...";
echo "is_bot=true" >> $GITHUB_OUTPUT;
else
echo "Not a bot. Proceeding to other jobs.";
echo "is_bot=false" >> $GITHUB_OUTPUT;
fi
eslint:
name: 'ESlint'
needs: check_for_bot
if: needs.check_for_bot.outputs.is_bot == 'false'
uses: ./.github/workflows/re-eslint.yml
prettier:
name: 'Prettier'
needs: check_for_bot
if: needs.check_for_bot.outputs.is_bot == 'false'
uses: ./.github/workflows/re-prettier.yml
typescript:
name: 'Typescript'
needs: check_for_bot
if: needs.check_for_bot.outputs.is_bot == 'false'
uses: ./.github/workflows/re-typescript.yml
tests:
name: 'Tests'
needs: check_for_bot
if: needs.check_for_bot.outputs.is_bot == 'false'
uses: ./.github/workflows/re-tests.yml
branch_name:
name: Branch Name
needs: check_for_bot
if: needs.check_for_bot.outputs.is_bot == 'false'
runs-on: ubuntu-latest
steps:
- name: '[Setup] Checkout'
uses: actions/checkout@v4
- name: '[Setup] Node.js'
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
check-latest: false
cache: npm
cache-dependency-path: package-lock.json
- name: '[Setup] Install dependencies'
run: npm install
- name: '[Run] Branch Name'
run: sh ./.husky/branch-name
pr_name:
name: PR Name
needs: check_for_bot
if: needs.check_for_bot.outputs.is_bot == 'false'
runs-on: ubuntu-latest
steps:
- name: '[Setup] Checkout'
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: '[Setup] Node.js'
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
check-latest: false
cache: npm
cache-dependency-path: package-lock.json
- name: '[Setup] Install dependencies'
run: npm install
- name: '[Run] PR Name'
run: echo "${{ github.event.pull_request.title }}" | npx --no -- commitlint