From f68ce62eff2d7ca8e5aa77927c9bb934fe3b867b Mon Sep 17 00:00:00 2001 From: Kevin Hoerr Date: Mon, 21 Nov 2022 13:13:12 -0500 Subject: Check no public changes in PRs (#6) * Check no public changes in PRs * Update PR workflow * Specify remote * Attempt HEAD diff * Check again * Remove trustedAuthors; use blank file to verify build failure * Remove public changes --- .github/workflows/pull_requests.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/pull_requests.yml b/.github/workflows/pull_requests.yml index f44f05a..a3cee9a 100644 --- a/.github/workflows/pull_requests.yml +++ b/.github/workflows/pull_requests.yml @@ -15,10 +15,17 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Check changes (prevent pushing to public/) + uses: xalvarez/prevent-file-change-action@v1 + with: + githubToken: ${{ secrets.GITHUB_TOKEN }} + pattern: public/ - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} cache: 'npm' - - run: npm ci - - run: npm run lint + - name: Install Node.js packages + run: npm ci + - name: Run linter + run: npm run lint -- cgit