-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathaction.yaml
39 lines (37 loc) · 1.35 KB
/
action.yaml
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
name: 'Synchronize staging branch'
description: 'Reset the staging branch with the main branch merging some branches identified by a specific label.'
inputs:
repository:
description: 'The repository name in Github owner/repository. e.g: TheMenu/monrepo'
default: ${{ github.repository }}
source-branch:
description: 'The branch name used as base branch to synchronize the target one.'
default: 'main'
target-branch:
description: 'The branch name used as target.'
default: 'staging'
label:
description: 'The PR label that is used to find branch to merge in the target one.'
default: 'in-staging'
user-name:
description: 'The user name used to push the branch.'
default: 'github-actions[bot]'
user-email:
description: 'The user email used to push the branch.'
default: 'github-actions[bot]@users.noreply.github.com'
branding:
color: 'blue'
icon: 'git-merge'
runs:
using: composite
steps:
- uses: oven-sh/setup-bun@v1
- run: |
git config user.name "${{ inputs.user-name }}"
git config user.email "${{ inputs.user-email }}"
bun ${{ github.action_path }}/index.ts \
--repository ${{ inputs.repository }} \
--source-branch ${{ inputs.source-branch }} \
--target-branch ${{ inputs.target-branch }} \
--label ${{ inputs.label }}
shell: bash