The Free Software Media System - Server Backend & API
Refactor Github Actions
Fernando Fernández854a12b312f5
diff --git a/.github/label-commenter-config.yml b/.github/label-commenter-config.ymldeleted file mode 100644index 0ff3a7f877..0000000000--- a/.github/label-commenter-config.yml+++ /dev/null@@ -1,43 +0,0 @@-comment:- header: Hello!- footer: "\- ---\n\n- > This is an automated comment created by the [peaceiris/actions-label-commenter]. \- Responding to the bot or mentioning it won't have any effect.\n\n- [peaceiris/actions-label-commenter]: https://github.com/peaceiris/actions-label-commenter- "--labels:- - name: stable backport- labeled:- pr:- body: |- This pull request has been tagged as a stable backport. It will be cherry-picked into the next stable point release.-- Please observe the following:-- * Any dependent PRs that this PR requires **must** be tagged for stable backporting as well.-- * Any issue(s) this PR fixes or closes **should** target the current stable release or a previous stable release to which a fix has not yet entered the current stable release.-- * This PR **must** be test cherry-picked against the current release branch (`release-X.Y.z` where X and Y are numbers). It must apply cleanly, or a diff of the expected change must be provided.-- To do this, run the following commands from your local copy of the Jellyfin repository:-- 1. `git checkout master`-- 1. `git merge --no-ff <myPullRequestBranch>`-- 1. `git log` -> `commit xxxxxxxxx`, grab hash-- 1. `git checkout release-X.Y.z` replacing X and Y with the *current* stable version (e.g. `release-10.7.z`)-- 1. `git cherry-pick -sx -m1 <hash>`-- Ensure the `cherry-pick` applies cleanly. If it does not, fix any merge conflicts *preserving as much of the original code as possible*, and make note of the resulting diff.-- Test your changes with a build to ensure they are successful. If not, adjust the diff accordingly.-- **Do not** push your merges to either branch. Use `git reset --hard HEAD~1` to revert both branches to their original state.-- Reply to this PR with a comment beginning "Cherry-pick test completed." and including the merge-conflict-fixing diff(s) if applicable.diff --git a/.github/workflows/automation.yml b/.github/workflows/automation.ymlindex 01998b8526..8da2349c8b 100644--- a/.github/workflows/automation.yml+++ b/.github/workflows/automation.yml@@ -1,21 +1,31 @@name: Automationon:+ push:+ branches:+ - masterpull_request_target:+ issue_comment:jobs:- main:+ label:+ name: Labelingruns-on: ubuntu-lateststeps:- - name: Does PR has the stable backport label?- uses: Dreamcodeio/[email protected]- id: checkLabel+ - name: Apply label+ uses: eps1lon/[email protected]+ if: ${{ github.event_name == 'push' || github.event_name == 'pull_request_target'}}with:- label: stable backport+ dirtyLabel: 'merge conflict'+ repoToken: ${{ secrets.JF_BOT_TOKEN }}+ project:+ name: Project board+ runs-on: ubuntu-latest+ steps:- name: Remove from 'Current Release' projectuses: alex-page/[email protected]- if: (github.event.pull_request || github.event.issue.pull_request) && !steps.checkLabel.outputs.hasLabel+ if: (github.event.pull_request || github.event.issue.pull_request) && !contains(github.event.*.labels.*.name, 'stable backport')continue-on-error: truewith:project: Current Release@@ -33,7 +43,7 @@ jobs:- name: Add to 'Current Release' projectuses: alex-page/[email protected]- if: (github.event.pull_request || github.event.issue.pull_request) && steps.checkLabel.outputs.hasLabel+ if: (github.event.pull_request || github.event.issue.pull_request) && !contains(github.event.*.labels.*.name, 'stable backport')continue-on-error: truewith:project: Current Releasediff --git a/.github/workflows/check-backport.yml b/.github/workflows/commands.ymlsimilarity index 81%rename from .github/workflows/check-backport.ymlrename to .github/workflows/commands.ymlindex 9ec58a3314..e0b91ecee6 100644--- a/.github/workflows/check-backport.yml+++ b/.github/workflows/commands.yml@@ -1,4 +1,4 @@-name: Stable Backport Check+name: Commandson:issue_comment:types:@@ -10,6 +10,29 @@ on:- synchronizejobs:+ rebase:+ name: Rebase+ if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '@jellyfin-bot rebase') && github.event.comment.author_association == 'MEMBER'+ runs-on: ubuntu-latest+ steps:+ - name: Notify as seen+ uses: peter-evans/[email protected]+ with:+ token: ${{ secrets.JF_BOT_TOKEN }}+ comment-id: ${{ github.event.comment.id }}+ reactions: '+1'++ - name: Checkout the latest code+ uses: actions/checkout@v2+ with:+ token: ${{ secrets.JF_BOT_TOKEN }}+ fetch-depth: 0++ - name: Automatic Rebase+ uses: cirrus-actions/[email protected]+ env:+ GITHUB_TOKEN: ${{ secrets.JF_BOT_TOKEN }}+check-backport:name: Check Backportif: ${{ ( github.event.issue.pull_request && contains(github.event.comment.body, '@jellyfin-bot check backport') ) || github.event.label.name == 'stable backport' || contains(github.event.pull_request.labels.*.name, 'stable backport' ) }}diff --git a/.github/workflows/label-commenter.yml b/.github/workflows/label-commenter.ymldeleted file mode 100644index 1d4eaaecdb..0000000000--- a/.github/workflows/label-commenter.yml+++ /dev/null@@ -1,24 +0,0 @@-name: Label Commenter--on:- issues:- types:- - labeled- - unlabeled- pull_request_target:- types:- - labeled- - unlabeled--jobs:- comment:- runs-on: ubuntu-20.04- steps:- - uses: actions/checkout@v2- with:- ref: master-- - name: Label Commenter- uses: peaceiris/actions-label-commenter@v1- with:- github_token: ${{ secrets.JF_BOT_TOKEN }}diff --git a/.github/workflows/merge-conflicts.yml b/.github/workflows/merge-conflicts.ymldeleted file mode 100644index 1b04eab467..0000000000--- a/.github/workflows/merge-conflicts.yml+++ /dev/null@@ -1,17 +0,0 @@-name: 'Merge Conflicts'--on:- push:- branches:- - master- pull_request_target:- types:- - synchronize-jobs:- triage:- runs-on: ubuntu-latest- steps:- - uses: eps1lon/[email protected]- with:- dirtyLabel: 'merge conflict'- repoToken: ${{ secrets.JF_BOT_TOKEN }}diff --git a/.github/workflows/rebase.yml b/.github/workflows/rebase.ymldeleted file mode 100644index 8471f458e9..0000000000--- a/.github/workflows/rebase.yml+++ /dev/null@@ -1,30 +0,0 @@-name: Automatic Rebase-on:- issue_comment:- types:- - created- - edited--jobs:- rebase:- name: Rebase- if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '@jellyfin-bot rebase') && github.event.comment.author_association == 'MEMBER'- runs-on: ubuntu-latest- steps:- - name: Notify as seen- uses: peter-evans/[email protected]- with:- token: ${{ secrets.JF_BOT_TOKEN }}- comment-id: ${{ github.event.comment.id }}- reactions: '+1'-- - name: Checkout the latest code- uses: actions/checkout@v2- with:- token: ${{ secrets.JF_BOT_TOKEN }}- fetch-depth: 0-- - name: Automatic Rebase- uses: cirrus-actions/[email protected]- env:- GITHUB_TOKEN: ${{ secrets.JF_BOT_TOKEN }}