-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge release strategy changes into 'main' (#1336)
* Tweaks to release pipeline (#1332) * Set environment based on different push events (#1330) * Fix: Forgot to define the branch variable (#1331) * Set error message on failure * Fix tag name syntax * Check source branches have hotfix or feature prefixes (#1334) * Open dependencies against main and staging (#1335)
- Loading branch information
1 parent
08e1ac6
commit ca65d8e
Showing
3 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Validate source branch | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- staging | ||
|
||
jobs: | ||
check: | ||
name: Incoming branch validation | ||
runs-on: ubuntu-latest | ||
steps: | ||
- id: branch | ||
name: Check branch name | ||
run: | | ||
GIT_BRANCH=${{ github.head_ref }} | ||
if [[ "$GIT_BRANCH" =~ ^hotfix/*|^feature/*|^renovate/* ]]; | ||
then | ||
echo "'$GIT_BRANCH' is a permitted branch" | ||
exit 0 | ||
else | ||
echo "'$GIT_BRANCH' is not a permitted branch" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters