Files
AIsouler-GKD_subscription/.github/workflows/pull_request_check.yml
dependabot[bot] 45f7f75249 chore(deps): bump tj-actions/changed-files from 44 to 46 in /.github/workflows (#788)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-27 16:31:10 +08:00

56 lines
1.2 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: pull_request_check
on:
pull_request:
branches:
- main
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get changed files
id: changed_files
uses: tj-actions/changed-files@v46
with:
files: |
src/apps/*.ts
src/categories.ts
src/globalGroups.ts
src/subscription.ts
- name: Check changed files
run: |
for file in ${{ steps.changed_files.outputs.all_changed_files }}; do
echo "$file was changed"
done
if [ ${{ steps.changed_files.outputs.all_changed_files_count }} -gt 1 ]; then
echo "your src subscription changed files count must <= 1"
exit 1
fi
- uses: actions/setup-node@v4
with:
node-version: 22
- uses: pnpm/action-setup@v4
- run: pnpm install
- run: pnpm run check
- run: pnpm run format
- run: pnpm run lint
- name: check format status
run: |
status=$(git status --porcelain)
if [ -n "$status" ]; then
echo "Something wasnt formatted properly"
git --no-pager diff
exit 1
fi