Skip to content

Commit c8aeb03

Browse files
authored
Merge pull request #11382 from nextcloud/nickvergessen-patch-2
Create block-merge-eol.yml
2 parents 039f9f7 + d1ee0d2 commit c8aeb03

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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'

0 commit comments

Comments
 (0)