-
-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (40 loc) · 1.63 KB
/
git-flow.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Name of the workflow
name: Git Flow
# Defines the event that triggers the workflow
on:
push:
branches:
- 'feature/*' # Trigger for pushes to feature branches
- 'bugfix/*' # Trigger for pushes to bugfix branches
- 'release/*' # Trigger for pushes to release branches
- 'hotfix/*' # Trigger for pushes to hotfix branches
# Jobs are a set of steps that execute on the same runner
jobs:
create-pull-request:
# Specifies the runner environment, using the latest Ubuntu
runs-on: ubuntu-latest
name: Create Pull Request
permissions: write-all
# Steps are individual tasks that run commands in a job
steps:
# Checks out the repository code under $GITHUB_WORKSPACE, so the job can access it
- name: Checkout Repository Code
uses: actions/checkout@v4.1.1
# This step uses the Git Flow Action to create PRs based on branch types
- name: Execute Git Flow Action
uses: nekofar/git-flow-action@develop # Specifies the Git Flow Action to use and the branch
with:
# The GitHub Token for authentication with GitHub API
github-token: ${{ secrets.GITHUB_TOKEN }}
# The branch to target for release and hotfix PRs
master-branch: 'master'
# The branch to target for feature and bugfix PRs
develop-branch: 'develop'
# Prefix for feature branches
feature-prefix: 'feature/'
# Prefix for bugfix branches
bugfix-prefix: 'bugfix/'
# Prefix for release branches
release-prefix: 'release/'
# Prefix for hotfix branches
hotfix-prefix: 'hotfix/'