Skip to content

Commit

Permalink
[github/workflows/add-label-when-promoted] add support for running in…
Browse files Browse the repository at this point in the history
… enterprise repo

Adding an enterprise branch as a valid option to be triggered. This will be used for supporting backports for enterprise features
  • Loading branch information
yaronkaikov committed Sep 19, 2024
1 parent d465204 commit b227b09
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/add-label-when-promoted.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@ on:
branches:
- master
- next-*.*
- enterprise
pull_request_target:
types: [labeled]
branches: [master, next]

env:
DEFAULT_BRANCH: ${{ github.repository == 'scylladb/scylla-enterprise' && 'enterprise' || 'master' }}
branches: [master, next, enterprise]

jobs:
check-commit:
Expand All @@ -23,6 +21,14 @@ jobs:
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Set Default Branch
id: set_branch
run: |
if [[ "${{ github.repository }}" == *enterprise* ]]; then
echo "DEFAULT_BRANCH=enterprise" >> $GITHUB_ENV
else
echo "DEFAULT_BRANCH=master" >> $GITHUB_ENV
fi
- name: Checkout repository
uses: actions/checkout@v4
with:
Expand Down

0 comments on commit b227b09

Please sign in to comment.