From 2fd11c510cb5e307119ca2f9bf7e7c08708da224 Mon Sep 17 00:00:00 2001 From: Dimitrios Panteleimon Giakatos Date: Fri, 8 Nov 2024 22:04:05 +0900 Subject: [PATCH] fix github actions --- .github/workflows/validate.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 17f0b076..296fa0ff 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -3,7 +3,7 @@ name: PR Validation on: pull_request: types: [edited, opened, synchronize, reopened] - branches: ["main", "dev"] + branches: ["*"] jobs: validate-pr: @@ -12,6 +12,15 @@ jobs: - name: Checkout repository uses: actions/checkout@v2 + - name: Determine if PR is from fork + id: check_fork + run: | + if [ "${{ github.event.pull_request.head.repo.full_name }}" != "${{ github.repository }}" ]; then + echo "is_fork=true" >> $GITHUB_ENV + else + echo "is_fork=false" >> $GITHUB_ENV + fi + - name: Clear all PR labels run: | pr_number=${{ github.event.pull_request.number }} @@ -23,6 +32,7 @@ jobs: done - name: Validate PR + if: env.is_fork == 'false' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: |