forked from hasundue/denopendabot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
109 lines (90 loc) · 3.05 KB
/
action.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
name: Denopendabot
description: Keeps your Deno projects up-to-date
branding:
icon: 'refresh-cw'
color: 'gray-dark'
inputs:
mode:
description: Run mode ('action' or 'app')
required: true
default: action
token:
description: Access token authorized to run workflows (for Action)
required: false
user-token:
description: Personal access token authorized to update workflows (for Action)
required: false
repository:
description: Repository to update dependencies
required: true
default: ${{ github.repository }}
base-branch:
description: Branch to update
required: true
default: main
working-branch:
description: Working branch for Denopendabot
required: true
default: denopendabot
root:
description: Path to the project root (not prefixed with './')
required: false
include:
description: Specify Files to update (space-separated)
required: false
exclude:
description: Files to exclude (space-separated)
required: false
labels:
description: Labels for the pull request (space-separated)
required: false
release:
description: Bump the project version to this value for a release
required: false
auto-merge:
description: Merge a pull request automaticaly ('any' or null, for App)
required: false
outputs:
updated:
description: true if updated
value: ${{ steps.run.outputs.updated }}
runs:
using: composite
steps:
- name: Run Denopendabot GitHub App
if: ${{ inputs.mode == 'app' }}
uses: peter-evans/repository-dispatch@v2
with:
event-type: denopendabot-run
client-payload: >
{
"baseBranch": "${{ inputs.base-branch }}",
"workingBranch": "${{ inputs.working-branch }}",
"root": "${{ inputs.root }}",
"include": "${{ inputs.include }}",
"exclude": "${{ inputs.exclude }}",
"labels": "${{ inputs.labels }}",
"release": "${{ inputs.release }}",
"autoMerge": "${{ inputs.auto-merge }}"
}
- name: Setup Deno
if: ${{ inputs.mode == 'action' }}
uses: denoland/setup-deno@v1
with:
deno-version: v1.32.4 # @denopendabot denoland/deno
- name: Run Denopendabot from the CLI
if: ${{ inputs.mode == 'action' }}
run: >
deno run -q --allow-env --allow-net --allow-write
https://deno.land/x/[email protected]/cli.ts
${{ inputs.repository }}
--base-branch ${{ inputs.base-branch }}
--working-branch ${{ inputs.working-branch }}
--token ${{ inputs.token || github.token }}
${{ inputs.root && format('--root {0}', inputs.root) }}
${{ inputs.user-token && format('--user-token {0}', inputs.user-token) }}
${{ inputs.include && format('--include {0}', inputs.include) }}
${{ inputs.exclude && format('--exclude {0}', inputs.exclude) }}
${{ inputs.release && format('--release {0}', inputs.release) }}
${{ inputs.labels && format('--labels {0}', inputs.labels) }}
shell: bash