Skip to content

Commit a809725

Browse files
committed
feat(ci): add git-town action
1 parent a538087 commit a809725

File tree

2 files changed

+118
-0
lines changed

2 files changed

+118
-0
lines changed

.git-branches.toml

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# Git Town configuration file
2+
#
3+
# Run "git town config setup" to add additional entries
4+
# to this file after updating Git Town.
5+
#
6+
# The "push-hook" setting determines whether Git Town
7+
# permits or prevents Git hooks while pushing branches.
8+
# Hooks are enabled by default. If your Git hooks are slow,
9+
# you can disable them to speed up branch syncing.
10+
#
11+
# When disabled, Git Town pushes using the "--no-verify" switch.
12+
# More info at https://www.git-town.com/preferences/push-hook.
13+
push-hook = true
14+
15+
# Should Git Town push the new branches it creates
16+
# immediately to origin even if they are empty?
17+
#
18+
# When enabled, you can run "git push" right away
19+
# but creating new branches is slower and
20+
# it triggers an unnecessary CI run on the empty branch.
21+
#
22+
# When disabled, many Git Town commands execute faster
23+
# and Git Town will create the missing tracking branch
24+
# on the first run of "git town sync".
25+
push-new-branches = false
26+
27+
# The "create-prototype-branches" setting determines whether Git Town
28+
# always creates prototype branches.
29+
# Prototype branches sync only locally and don't create a tracking branch
30+
# until they are proposed.
31+
#
32+
# More info at https://www.git-town.com/preferences/create-prototype-branches.
33+
create-prototype-branches = false
34+
35+
# Which method should Git Town use to ship feature branches?
36+
#
37+
# Options:
38+
#
39+
# - api: merge the proposal on your code hosting platform via the code hosting API
40+
# - fast-forward: in your local repo, fast-forward the parent branch to point to the commits on the feature branch
41+
# - squash-merge: in your local repo, squash-merge the feature branch into its parent branch
42+
#
43+
# All options update proposals of child branches and remove the shipped branch locally and remotely.
44+
ship-strategy = "api"
45+
46+
# Should "git town ship" delete the tracking branch?
47+
# You want to disable this if your code hosting platform
48+
# (GitHub, GitLab, etc) deletes head branches when
49+
# merging pull requests through its UI.
50+
ship-delete-tracking-branch = false
51+
52+
# Should "git town sync" sync tags with origin?
53+
sync-tags = true
54+
55+
# Should "git town sync" also fetch updates from the upstream remote?
56+
#
57+
# If an "upstream" remote exists, and this setting is enabled,
58+
# "git town sync" will also update the local main branch
59+
# with commits from the main branch at the upstream remote.
60+
#
61+
# This is useful if the repository you work on is a fork,
62+
# and you want to keep it in sync with the repo it was forked from.
63+
sync-upstream = true
64+
65+
[branches]
66+
67+
# The main branch is the branch from which you cut new feature branches,
68+
# and into which you ship feature branches when they are done.
69+
# This branch is often called "main", "master", or "development".
70+
main = "master"
71+
72+
# Perennial branches are long-lived branches.
73+
# They are never shipped and have no ancestors.
74+
# Typically, perennial branches have names like
75+
# "development", "staging", "qa", "production", etc.
76+
#
77+
# See also the "perennial-regex" setting.
78+
perennials = []
79+
80+
# All branches whose name matches this regular expression
81+
# are also considered perennial branches.
82+
#
83+
# If you are not sure, leave this empty.
84+
perennial-regex = ""
85+
86+
[hosting]
87+
88+
# Knowing the type of code hosting platform allows Git Town
89+
# to open browser URLs and talk to the code hosting API.
90+
# Most people can leave this on "auto-detect".
91+
# Only change this if your code hosting server uses as custom URL.
92+
# platform = ""
93+
94+
# When using SSH identities, define the hostname
95+
# of your source code repository. Only change this
96+
# if the auto-detection does not work for you.
97+
# origin-hostname = ""
98+
99+
[sync-strategy]
100+
101+
# How should Git Town synchronize feature branches?
102+
# Feature branches are short-lived branches cut from
103+
# the main branch and shipped back into the main branch.
104+
# Typically you develop features and bug fixes on them,
105+
# hence their name.
106+
feature-branches = "rebase"
107+
108+
# How should Git Town synchronize perennial branches?
109+
# Perennial branches have no parent branch.
110+
# The only updates they receive are additional commits
111+
# made to their tracking branch somewhere else.
112+
perennial-branches = "rebase"

.github/workflows/verify.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ permissions:
99
contents: read
1010

1111
jobs:
12+
git-town:
13+
if: ${{ github.event_name == 'pull_request' }}
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Git Town
17+
uses: git-town/action@v1
1218
lint:
1319
runs-on: ubuntu-latest
1420
steps:

0 commit comments

Comments
 (0)