Skip to content

Commit

Permalink
Restrict workflow to MPS branches only, ignore old MPS versions
Browse files Browse the repository at this point in the history
  • Loading branch information
sergej-koscejev committed Nov 11, 2023
1 parent e9a4c89 commit dec03de
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/PR-into-next-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: PR to merge into the next version
on:
push:
branches:
- 'maintenance/*'
- 'maintenance/mps*'

jobs:
create-pr:
Expand All @@ -17,8 +17,8 @@ jobs:
echo "Calculating PR branches:"
# Next branch matching refs/heads/maintenance/* pattern, or empty if we're on the last one
next_maintenance_branch=$(gh api "/repos/$owner_and_repo/git/matching-refs/heads/maintenance/" \
--jq 'map(.ref | ltrimstr("refs/heads/") | select(. > "${{ github.ref_name }}")) | sort | min')
next_maintenance_branch=$(gh api "/repos/$owner_and_repo/git/matching-refs/heads/maintenance/mps" \
--jq 'map(.ref | ltrimstr("refs/heads/") | select(. > "${{ github.ref_name }}" and . < "maintenance/mps3")) | min')
echo " Next maintenance branch: ${next_maintenance_branch:-(none)}"
# Substitute the default branch if empty
Expand Down

0 comments on commit dec03de

Please sign in to comment.