From 11776c4f5c71f0e84de7ee94e57f3e57e2c56a8d Mon Sep 17 00:00:00 2001 From: nostrdev-com <support@nostrdev.com> Date: Thu, 3 Apr 2025 10:54:17 +0300 Subject: [PATCH] chore(ci): added staging-pull-request workflow --- .git-hooks/pre-commit | 2 +- .gitea/workflows/staging-pull-request.yaml | 37 ++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 .gitea/workflows/staging-pull-request.yaml diff --git a/.git-hooks/pre-commit b/.git-hooks/pre-commit index 3ce5405..194d529 100755 --- a/.git-hooks/pre-commit +++ b/.git-hooks/pre-commit @@ -13,7 +13,7 @@ if [[ "$BRANCH" =~ $REGEX ]]; then fi # Lint staged files -npm run build +npm run lint-staged # Run license-checker npm run license-checker \ No newline at end of file diff --git a/.gitea/workflows/staging-pull-request.yaml b/.gitea/workflows/staging-pull-request.yaml new file mode 100644 index 0000000..8b9eece --- /dev/null +++ b/.gitea/workflows/staging-pull-request.yaml @@ -0,0 +1,37 @@ +name: Open PR on Staging +on: + pull_request: + types: [opened, edited, synchronize] + branches: + - staging + +jobs: + audit_and_check: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Node + uses: actions/setup-node@v2 + with: + node-version: 20 + + - name: Audit + run: npm audit --omit=dev + + - name: Install Dependencies + run: npm ci + + - name: License check + run: npm run license-checker + + - name: Lint check + run: npm run lint + + - name: Formatter check + run: npm run formatter:check + + - name: Create Build + run: npm run build