diff --git a/.github/workflows/__automation.yml b/.github/workflows/__automation.yml new file mode 100644 index 00000000000..e5953972437 --- /dev/null +++ b/.github/workflows/__automation.yml @@ -0,0 +1,17 @@ +name: Automation 🎛️ + +on: + workflow_call: + +jobs: + label: + name: Label conflicted PRs 🏷️⛔ + if: ${{ always() && !cancelled() }} + runs-on: ubuntu-latest + + steps: + - name: Check all PRs for merge conflicts and label them ⛔ + uses: eps1lon/actions-label-merge-conflict@v3.0.2 + with: + dirtyLabel: "merge conflict" + repoToken: ${{ secrets.JF_BOT_TOKEN }} diff --git a/.github/workflows/__codeql.yml b/.github/workflows/__codeql.yml index 633d37ecd23..f1e3ec6e50e 100644 --- a/.github/workflows/__codeql.yml +++ b/.github/workflows/__codeql.yml @@ -8,7 +8,7 @@ on: type: string jobs: analyze: - name: Analyze ${{ matrix.language}} 🔬 + name: Analyze ${{ matrix.language }} 🔬 runs-on: ubuntu-latest strategy: diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index a35fc7244d5..278449a2a1d 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -13,7 +13,7 @@ on: jobs: push-comment: name: Create comments ✍️ - if: ${{ always() && !cancelled() }} + if: ${{ always() && !cancelled() && github.repository == 'jellyfin/jellyfin-vue' }} uses: ./.github/workflows/__job_messages.yml secrets: inherit with: @@ -21,9 +21,15 @@ jobs: in_progress: true comment: true + automation: + name: Automation 🎛️ + if: ${{ github.repository == 'jellyfin/jellyfin-vue' }} + uses: ./.github/workflows/__automation.yml + secrets: inherit + label: name: Labeling 🏷️ - if: ${{ always() }} + if: ${{ always() && github.repository == 'jellyfin/jellyfin-vue'}} runs-on: ubuntu-latest steps: @@ -66,7 +72,7 @@ jobs: deploy: name: Deploy 🚀 uses: ./.github/workflows/__deploy.yml - if: ${{ always() && !cancelled() && needs.build.result == 'success' }} + if: ${{ always() && !cancelled() && needs.build.result == 'success' && github.repository == 'jellyfin/jellyfin-vue' }} needs: - push-comment - build diff --git a/.github/workflows/push_release.yml b/.github/workflows/push_release.yml index 664427ff5b5..69668890a7c 100644 --- a/.github/workflows/push_release.yml +++ b/.github/workflows/push_release.yml @@ -16,17 +16,11 @@ on: - '**/*.md' jobs: - label: - name: Label conflicted PRs 🏷️⛔ - if: ${{ always() && !cancelled() }} - runs-on: ubuntu-latest - - steps: - - name: Check all PRs for merge conflicts and label them ⛔ - uses: eps1lon/actions-label-merge-conflict@v3.0.2 - with: - dirtyLabel: "merge conflict" - repoToken: ${{ secrets.JF_BOT_TOKEN }} + automation: + name: Automation 🎛️ + if: ${{ github.repository == 'jellyfin/jellyfin-vue' }} + uses: ./.github/workflows/__automation.yml + secrets: inherit main: name: ${{ github.event_name == 'push' && 'Unstable 🚀⚠️' || 'Stable 🏷️✅' }} @@ -40,7 +34,7 @@ jobs: commit: ${{ github.event_name == 'push' && github.sha }} is_prerelease: ${{ github.event_name == 'release' && github.event.action == 'prereleased' }} tag_name: ${{ github.event_name == 'release' && github.event.release.tag_name }} - push: true + push: ${{ github.repository == 'jellyfin/jellyfin-vue' }} codeql: name: GitHub CodeQL 🔬 @@ -54,6 +48,7 @@ jobs: deploy: name: Deploy 🚀 + if: ${{ github.repository == 'jellyfin/jellyfin-vue' }} uses: ./.github/workflows/__deploy.yml needs: - main