Skip to content

Commit 88282c2

Browse files
authored
get default from git config to fix #83 (#86)
1 parent 6cc87c3 commit 88282c2

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

doc-site/docs/about/module-life-cycle.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ _Run once only during `zero apply`_
2626
## On-going
2727
### Pull request
2828
- Unit test
29-
### Push to master branch
29+
### Push to master/main branch
3030
- Unit test
3131
- Build docker image
3232
- Deploy image to Staging cluster using Kustomize

scripts/gha-setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ EOF
3434
## Branch Protect for PRs
3535
## By default we setup Pull-request checks of [lint, unit-test] in `.github/workflows/pull-request.yml`
3636
## And we will enforce both the checks pass before PR can be merged into default branch
37-
DEFAULT_BRANCH=master
37+
DEFAULT_BRANCH=`git config --get init.defaultBranch || echo main`
3838
curl -XPUT "https://api.github.com/repos/$GITHUB_ORG/$GITHUB_REPO/branches/$DEFAULT_BRANCH/protection" \
3939
--header "Authorization: token $GITHUB_ACCESS_TOKEN" \
4040
--header 'Content-Type: application/json' \

templates/.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ workflows:
291291
filters:
292292
branches:
293293
only: # only branches matching the below regex filters will run
294-
- /^master$/
294+
- /^(master|main)$/
295295

296296
- deploy:
297297
name: deploy_staging

0 commit comments

Comments
 (0)