merge-stable.yml 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. name: Stable branch auto merge
  2. on:
  3. push:
  4. branches: [ stable ]
  5. jobs:
  6. merge:
  7. runs-on: ubuntu-latest
  8. steps:
  9. # First: merge
  10. - uses: octokit/request-action@v2.x
  11. id: merge_action
  12. with:
  13. route: POST /repos/:repository/merges
  14. repository: ${{ github.repository }}
  15. base: master
  16. head: stable
  17. env:
  18. GITHUB_TOKEN: ${{ secrets.STABLE_MERGE_GITHUB_TOKEN }}
  19. # Report errors if any
  20. - uses: rtCamp/action-slack-notify@v2.0.2
  21. id: error_message_slack
  22. name: Slack notification
  23. if: ((steps.merge_action.outputs.status != 201) && (steps.merge_action.outputs.status != 204)) || failure()
  24. env:
  25. SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
  26. SLACK_CHANNEL: "cke5-ci"
  27. SLACK_ICON: https://github.com/ckeditor.png?size=48
  28. SLACK_USERNAME: "stable auto merge action"
  29. SLACK_MESSAGE: ${{ format('💥 Error, merge call returned code {0}, see {1} for a list of codes with explanation. 💥', steps.merge_action.outputs.status, 'https://developer.github.com/v3/repos/merging/#perform-a-merge' ) }}