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+ # SPDX-FileCopyrightText: 2022-2024 Nextcloud GmbH and Nextcloud contributors
7+ # SPDX-License-Identifier: MIT
8+
9+ name : Block merges for EOL
10+
11+ on : pull_request
12+
13+ permissions :
14+ contents : read
15+
16+ concurrency :
17+ group : block-merge-eol-${{ github.head_ref || github.run_id }}
18+ cancel-in-progress : true
19+
20+ jobs :
21+ block-merges-eol :
22+ name : Block merges for EOL branches
23+
24+ # Only run on stableXX branches
25+ if : startsWith( github.base_ref, 'stable')
26+ runs-on : ubuntu-latest-low
27+
28+ steps :
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+ echo "current_month=$(date +%Y-%m)" >> $GITHUB_ENV
35+
36+ - name : Checking if ${{ env.server_major }} is EOL
37+ run : |
38+ curl -s https://raw.githubusercontent.com/nextcloud-releases/updater_server/production/config/major_versions.json \
39+ | jq '.["${{ env.server_major }}"]["eol"] // "9999-99" | . >= "${{ env.current_month }}"' \
40+ | grep -q true
You can’t perform that action at this time.
0 commit comments