diff --git a/.github/workflows/assign-issue.yml b/.github/workflows/assign-issue.yml index e88f6b762d2..a4c8899c249 100644 --- a/.github/workflows/assign-issue.yml +++ b/.github/workflows/assign-issue.yml @@ -9,6 +9,7 @@ on: jobs: assign: + if: github.repository_owner == 'JabRef' runs-on: ubuntu-latest permissions: issues: write diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml index 67881841c46..ce4c607f16c 100644 --- a/.github/workflows/check-links.yml +++ b/.github/workflows/check-links.yml @@ -18,6 +18,7 @@ concurrency: jobs: lychee: + if: github.repository_owner == 'JabRef' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/cleanup-pr.yml b/.github/workflows/cleanup-pr.yml index bd38e11ea16..ecd3936ef52 100644 --- a/.github/workflows/cleanup-pr.yml +++ b/.github/workflows/cleanup-pr.yml @@ -7,27 +7,14 @@ on: jobs: cleanup: runs-on: ubuntu-latest + if: github.repository_owner == 'JabRef' steps: - name: Cancel deployment run uses: styfle/cancel-workflow-action@0.12.1 with: ignore_sha: true workflow_id: 9813 # workflow "Deployment" - - name: Check secrets presence - id: checksecrets - shell: bash - run: | - if [ "$BUILDJABREFPRIVATEKEY" == "" ]; then - echo "secretspresent=NO" >> $GITHUB_OUTPUT - echo "❌ Secret BUILDJABREFPRIVATEKEY not present" - else - echo "secretspresent=YES" >> $GITHUB_OUTPUT - echo "✔️ Secret BUILDJABREFPRIVATEKEY present" - fi - env: - BUILDJABREFPRIVATEKEY: ${{ secrets.buildJabRefPrivateKey }} - name: Delete folder on builds.jabref.org - if: steps.checksecrets.outputs.secretspresent == 'YES' uses: appleboy/ssh-action@v1.1.0 with: script: rm -rf /var/www/builds.jabref.org/www/pull/${{ github.event.pull_request.number }} || true @@ -36,7 +23,6 @@ jobs: username: jrrsync key: ${{ secrets.buildJabRefPrivateKey }} - name: Update PR comment - if: steps.checksecrets.outputs.secretspresent == 'YES' uses: thollander/actions-comment-pull-request@v3 with: comment-tag: download-link diff --git a/.github/workflows/deployment-arm64.yml b/.github/workflows/deployment-arm64.yml index cd360c1f474..231fb3f15cb 100644 --- a/.github/workflows/deployment-arm64.yml +++ b/.github/workflows/deployment-arm64.yml @@ -34,6 +34,7 @@ concurrency: jobs: build: + if: github.repository_owner == 'JabRef' strategy: fail-fast: false matrix: diff --git a/.github/workflows/deployment-jdk-ea.yml b/.github/workflows/deployment-jdk-ea.yml index 2bc7390f568..e956241d703 100644 --- a/.github/workflows/deployment-jdk-ea.yml +++ b/.github/workflows/deployment-jdk-ea.yml @@ -32,6 +32,7 @@ concurrency: jobs: build: + if: github.repository_owner == 'JabRef' strategy: fail-fast: false matrix: diff --git a/.github/workflows/gource.yml b/.github/workflows/gource.yml index cfdbc44d6e0..3bccc1f3d14 100644 --- a/.github/workflows/gource.yml +++ b/.github/workflows/gource.yml @@ -15,6 +15,7 @@ concurrency: jobs: action: + if: github.repository_owner == 'JabRef' runs-on: ubuntu-latest steps: - name: 'Checkout' diff --git a/.github/workflows/on-labeled-issue.yml b/.github/workflows/on-labeled-issue.yml index 8cc260e8939..93e65e1cf66 100644 --- a/.github/workflows/on-labeled-issue.yml +++ b/.github/workflows/on-labeled-issue.yml @@ -9,7 +9,7 @@ jobs: Assigned: # Triggered when manually assigned the label "📍 Assigned" to trigger the automatic unassignment after 30 days name: "📍 Assigned" - if: ${{ github.event.label.name == '📍 Assigned' }} + if: ${{ github.event.label.name == '📍 Assigned' && github.repository_owner == 'JabRef' }} runs-on: ubuntu-latest permissions: issues: write @@ -35,7 +35,7 @@ jobs: default-column: "Free to take" skip-if-not-in-project: true FirstTimeCodeContribution: - if: ${{ github.event.label.name == 'FirstTimeCodeContribution' }} + if: ${{ github.event.label.name == 'FirstTimeCodeContribution' && github.repository_owner == 'JabRef' }} runs-on: ubuntu-latest permissions: issues: write @@ -80,7 +80,7 @@ jobs: skip-if-not-in-project: true good-first-issue: name: "good first issue" - if: "${{ github.event.label.name == 'good first issue' }}" + if: "${{ github.event.label.name == 'good first issue' && github.repository_owner == 'JabRef' }}" runs-on: ubuntu-latest steps: - name: "good first issue" @@ -90,7 +90,7 @@ jobs: ISSUE_URL=$(jq --raw-output .issue.html_url "$GITHUB_EVENT_PATH") gh project item-add 5 --owner JabRef --url $ISSUE_URL needs-refinement: - if: github.event.label.name == 'needs-refinement' + if: github.event.label.name == 'needs-refinement' && github.repository_owner == 'JabRef' runs-on: ubuntu-latest steps: - name: needs-refinement @@ -101,7 +101,7 @@ jobs: gh project item-add 15 --owner JabRef --url $ISSUE_URL status-freeze: name: "status: freeze" - if: "${{ github.event.label.name == 'status: freeze' }}" + if: "${{ github.event.label.name == 'status: freeze' && github.repository_owner == 'JabRef' }}" runs-on: ubuntu-latest steps: - name: "status: freeze" @@ -111,7 +111,7 @@ jobs: ISSUE_URL=$(jq --raw-output .issue.html_url "$GITHUB_EVENT_PATH") gh project item-add 9 --owner JabRef --url $ISSUE_URL ui: - if: "${{ github.event.label.name == 'ui' }}" + if: "${{ github.event.label.name == 'ui' && github.repository_owner == 'JabRef' }}" runs-on: ubuntu-latest steps: - name: ui diff --git a/.github/workflows/on-labeled-pr.yml b/.github/workflows/on-labeled-pr.yml index 4ceb3844fe7..2e64d79f1f7 100644 --- a/.github/workflows/on-labeled-pr.yml +++ b/.github/workflows/on-labeled-pr.yml @@ -8,7 +8,7 @@ on: jobs: automerge: name: Auto Merge - if: "${{ github.event.label.name == 'automerge' }}" + if: "${{ github.event.label.name == 'automerge' && github.repository_owner == 'JabRef' }}" runs-on: ubuntu-latest steps: - name: Approve PR diff --git a/.github/workflows/on-unlabeled-issue.yml b/.github/workflows/on-unlabeled-issue.yml index 9c5870066ca..64872289b3d 100644 --- a/.github/workflows/on-unlabeled-issue.yml +++ b/.github/workflows/on-unlabeled-issue.yml @@ -7,7 +7,7 @@ on: jobs: FirstTimeCodeContribution_or_Assigned: - if: ${{ (github.event.label.name == 'FirstTimeCodeContribution') || (github.event.label.name == '📍 Assigned') }} + if: ${{ ((github.event.label.name == 'FirstTimeCodeContribution') || (github.event.label.name == '📍 Assigned')) && github.repository_owner == 'JabRef' }} runs-on: ubuntu-latest permissions: issues: write diff --git a/.github/workflows/pr-comment.yml b/.github/workflows/pr-comment.yml index 55384f04c53..b93face4b88 100644 --- a/.github/workflows/pr-comment.yml +++ b/.github/workflows/pr-comment.yml @@ -14,7 +14,7 @@ on: jobs: comment: # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#running-a-workflow-based-on-the-conclusion-of-another-workflow - if: ${{ github.event.workflow_run.conclusion == 'failure' }} + if: ${{ github.event.workflow_run.conclusion == 'failure' && (github.repository_owner == 'JabRef') }} runs-on: ubuntu-latest permissions: actions: read diff --git a/.github/workflows/update-gradle-wrapper.yml b/.github/workflows/update-gradle-wrapper.yml index 826a211b195..f65338cf884 100644 --- a/.github/workflows/update-gradle-wrapper.yml +++ b/.github/workflows/update-gradle-wrapper.yml @@ -7,6 +7,7 @@ on: jobs: update-gradle-wrapper: + if: github.repository_owner == 'JabRef' runs-on: ubuntu-latest steps: