diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 1779616..c4ad469 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -14,6 +14,13 @@ jobs: pull-requests: write runs-on: ubuntu-latest steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: git config + run: | + git config user.name "${GITHUB_ACTOR}" + git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" - name: Set PR number id: set-pr run: | diff --git a/.github/workflows/pr-guard.yml b/.github/workflows/pr-guard.yml new file mode 100644 index 0000000..46faf7f --- /dev/null +++ b/.github/workflows/pr-guard.yml @@ -0,0 +1,29 @@ +name: "PR files guard" + +on: + pull_request: + types: [opened, synchronize, reopened] + +jobs: + check-dist: + runs-on: ubuntu-latest + permissions: + pull-requests: write + steps: + - uses: dorny/paths-filter@v3 + id: filter + with: + filters: | + dist: + - 'dist/**' + + - name: Comment if dist/ was changed + if: steps.filter.outputs.dist == 'true' + uses: peter-evans/create-or-update-comment@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + issue-number: ${{ github.event.pull_request.number }} + body: | + ⚠️ **Warning!** You have made changes to the `dist/` directory. + These files should not be edited manually as they will be built by our CI/CD pipeline during release. + Please remove these changes from the pull request.