File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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+ name : Block merges for EOL
7+
8+ on : pull_request
9+
10+ permissions :
11+ contents : read
12+
13+ concurrency :
14+ group : block-merge-eol-${{ github.head_ref || github.run_id }}
15+ cancel-in-progress : true
16+
17+ jobs :
18+ block-merges-eol :
19+ name : Block merges for EOL branches
20+
21+ # Only run on stableXX branches
22+ if : startsWith( github.base_ref, 'stable')
23+ runs-on : ubuntu-latest
24+
25+ steps :
26+ - name : Download updater config
27+ run : curl https://raw.githubusercontent.com/nextcloud/updater_server/production/config/config.php --output config.php
28+
29+ - name : Set server major version environment
30+ run : |
31+ # retrieve version number from branch reference
32+ server_major=$(echo "${{ github.base_ref }}" | sed -En 's/stable//p')
33+ echo "server_major=$server_major" >> $GITHUB_ENV
34+
35+ - name : Checking if ${{ env.server_major }} is EOL
36+ run : |
37+ php -r 'echo json_encode(require_once "config.php");' | jq --arg version "${{ env.server_major }}" '.stable[$version]["100"].eol // .beta[$version]["100"].eol' | grep --silent -i 'false'
You can’t perform that action at this time.
0 commit comments