-
Notifications
You must be signed in to change notification settings - Fork 9
44 lines (40 loc) · 1.52 KB
/
automerge.yml
File metadata and controls
44 lines (40 loc) · 1.52 KB
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
on:
workflow_call:
secrets:
SVC_CLI_BOT_GITHUB_TOKEN:
description: override the autogenerated github token
required: false
inputs:
mergeMethod:
required: false
description: merge, squash, or rebase
default: merge
type: string
maxVersionBump:
required: false
description: "['patch', 'minor', 'major'] maximum allowed version bump. You probably don't want to automate major version bumps!"
type: string
default: "minor"
skipCI:
required: false
description: Optionally skip ci builds on merges into main
type: boolean
default: false
jobs:
dependabot-automerge:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.SVC_CLI_BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
- uses: actions/setup-node@v4
with:
node-version: lts/*
cache: npm
- run: npm install -g @salesforce/plugin-release-management --omit=dev
- name: run automerge command
run: sf-release dependabot:automerge --merge-method "$INPUTS_MERGE_METHOD" --max-version-bump "$INPUTS_MAX_VERSION_BUMP" --owner $GITHUB_REPOSITORY_OWNER --repo $(basename $GITHUB_REPOSITORY) ${{ inputs.skipCI && '--skip-ci' || '' }}
env:
GITHUB_TOKEN: ${{ secrets.SVC_CLI_BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
INPUTS_MERGE_METHOD: ${{ inputs.mergeMethod }}
INPUTS_MAX_VERSION_BUMP: ${{ inputs.maxVersionBump }}