-
Notifications
You must be signed in to change notification settings - Fork 22
/
action.yml
47 lines (44 loc) · 1.68 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
# action.yml
name: 'Delete abandoned branches'
description: |
Deletes old branches from your repo as long as they aren't part of an open pull request, the default branch, or protected.
author: Luis Pabon (PHPDocker.io)
branding:
icon: git-branch
color: orange
inputs:
ignore_branches:
description: "Comma-separated list of branches to ignore and never delete. You don't need to add your protected branches here."
required: false
default: ""
last_commit_age_days:
description: "How old in days must be the last commit into the branch for the branch to be deleted."
required: false
default: "60"
allowed_prefixes:
description: "Comma-separated list of prefixes a branch must match to be deleted."
required: false
default: ""
dry_run:
description: "Whether we're actually deleting branches at all. Defaults to 'yes'. Possible values: yes, no (case sensitive)"
required: true
github_token:
description: "The github token to use on requests to the github api"
required: true
github_base_url:
description: "The API base url to be used in requests to GitHub Enterprise"
required: false
default: "https://api.github.com"
outputs:
deleted_branches: # id of output
description: 'Branches that have been deleted, if any'
runs:
using: 'docker'
image: 'docker://phpdockerio/github-actions-delete-abandoned-branches:v2'
args:
- --ignore-branches=${{ inputs.ignore_branches }}
- --last-commit-age-days=${{ inputs.last_commit_age_days }}
- --allowed-prefixes=${{ inputs.allowed_prefixes }}
- --dry-run=${{ inputs.dry_run }}
- --github-token=${{ inputs.github_token }}
- --github-base-url=${{ inputs.github_base_url }}