您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

block-merge-eol.yml 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # This workflow is provided via the organization template repository
  2. #
  3. # https://github.com/nextcloud/.github
  4. # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
  5. #
  6. # SPDX-FileCopyrightText: 2022-2024 Nextcloud GmbH and Nextcloud contributors
  7. # SPDX-License-Identifier: MIT
  8. name: Block merges for EOL
  9. on: pull_request
  10. permissions:
  11. contents: read
  12. concurrency:
  13. group: block-merge-eol-${{ github.head_ref || github.run_id }}
  14. cancel-in-progress: true
  15. jobs:
  16. block-merges-eol:
  17. name: Block merges for EOL branches
  18. # Only run on stableXX branches
  19. if: startsWith( github.base_ref, 'stable')
  20. runs-on: ubuntu-latest-low
  21. steps:
  22. - name: Download updater config
  23. run: curl https://raw.githubusercontent.com/nextcloud/updater_server/production/config/config.php --output config.php
  24. - name: Set server major version environment
  25. run: |
  26. # retrieve version number from branch reference
  27. server_major=$(echo "${{ github.base_ref }}" | sed -En 's/stable//p')
  28. echo "server_major=$server_major" >> $GITHUB_ENV
  29. - name: Checking if ${{ env.server_major }} is EOL
  30. run: |
  31. php -r 'echo json_encode(require_once "config.php");' | jq --arg version "${{ env.server_major }}" '.stable[$version]["100"].eol // .beta[$version]["100"].eol // "NotEOL"' | grep -q "NotEOL"