automation.yml 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. name: Automation
  2. on:
  3. push:
  4. branches:
  5. - master
  6. pull_request_target:
  7. issue_comment:
  8. jobs:
  9. label:
  10. name: Labeling
  11. runs-on: ubuntu-latest
  12. if: ${{ github.repository == 'jellyfin/jellyfin' }}
  13. steps:
  14. - name: Apply label
  15. uses: eps1lon/actions-label-merge-conflict@v2.0.1
  16. if: ${{ github.event_name == 'push' || github.event_name == 'pull_request_target'}}
  17. with:
  18. dirtyLabel: 'merge conflict'
  19. repoToken: ${{ secrets.JF_BOT_TOKEN }}
  20. project:
  21. name: Project board
  22. runs-on: ubuntu-latest
  23. if: ${{ github.repository == 'jellyfin/jellyfin' }}
  24. steps:
  25. - name: Remove from 'Current Release' project
  26. uses: alex-page/github-project-automation-plus@v0.7.1
  27. if: (github.event.pull_request || github.event.issue.pull_request) && !contains(github.event.*.labels.*.name, 'stable backport')
  28. continue-on-error: true
  29. with:
  30. project: Current Release
  31. action: delete
  32. repo-token: ${{ secrets.JF_BOT_TOKEN }}
  33. - name: Add to 'Release Next' project
  34. uses: alex-page/github-project-automation-plus@v0.7.1
  35. if: (github.event.pull_request || github.event.issue.pull_request) && github.event.action == 'opened'
  36. continue-on-error: true
  37. with:
  38. project: Release Next
  39. column: In progress
  40. repo-token: ${{ secrets.JF_BOT_TOKEN }}
  41. - name: Add to 'Current Release' project
  42. uses: alex-page/github-project-automation-plus@v0.7.1
  43. if: (github.event.pull_request || github.event.issue.pull_request) && !contains(github.event.*.labels.*.name, 'stable backport')
  44. continue-on-error: true
  45. with:
  46. project: Current Release
  47. column: In progress
  48. repo-token: ${{ secrets.JF_BOT_TOKEN }}
  49. - name: Check number of comments from the team member
  50. if: github.event.issue.pull_request == '' && github.event.comment.author_association == 'MEMBER'
  51. id: member_comments
  52. run: echo "::set-output name=number::$(curl -s ${{ github.event.issue.comments_url }} | jq '.[] | select(.author_association == "MEMBER") | .author_association' | wc -l)"
  53. - name: Move issue to needs triage
  54. uses: alex-page/github-project-automation-plus@v0.7.1
  55. if: github.event.issue.pull_request == '' && github.event.comment.author_association == 'MEMBER' && steps.member_comments.outputs.number <= 1
  56. continue-on-error: true
  57. with:
  58. project: Issue Triage for Main Repo
  59. column: Needs triage
  60. repo-token: ${{ secrets.JF_BOT_TOKEN }}
  61. - name: Add issue to triage project
  62. uses: alex-page/github-project-automation-plus@v0.7.1
  63. if: github.event.issue.pull_request == '' && github.event.action == 'opened'
  64. continue-on-error: true
  65. with:
  66. project: Issue Triage for Main Repo
  67. column: Pending response
  68. repo-token: ${{ secrets.JF_BOT_TOKEN }}