This repository has been archived by the owner on Apr 30, 2021. It is now read-only.
generated from actions/container-action
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
25 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,14 @@ | ||
# action-delete-branch | ||
# Delete branch Github Action | ||
|
||
This action simply deletes a branch from origin repository | ||
An action that simply deletes a branch from repository. | ||
|
||
## Usage | ||
|
||
```yaml | ||
- uses: dawidd6/action-delete-branch@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Delete PR head branch | ||
uses: dawidd6/action-delete-branch@master | ||
with: | ||
branch: xyz | ||
``` | ||
```yaml | ||
# works only if tested commit is referenced to pull request or issue | ||
# PR_NUMBER is replaced by pull request number | ||
- uses: dawidd6/action-delete-branch@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
branch: xyz-PR_NUMBER | ||
be_kind: true | ||
``` | ||
```yaml | ||
# works only if tested commit is referenced to pull request or issue | ||
# PR_HEAD_BRANCH is replaced by pull request head branch | ||
- uses: dawidd6/action-delete-branch@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
branch: PR_HEAD_BRANCH | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: ${{ github.pull_request.head.ref }} | ||
be_kind: true # don't fail on errors | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,20 @@ | ||
name: 'delete-branch' | ||
description: 'Delete branch' | ||
author: 'dawidd6' | ||
name: delete-branch | ||
description: Delete branch | ||
author: dawidd6 | ||
branding: | ||
icon: git-branch | ||
color: red | ||
inputs: | ||
github_token: | ||
description: Github token | ||
required: true | ||
branch: | ||
description: 'Branch name to delete' | ||
description: Branch name to delete | ||
required: true | ||
default: '' | ||
be_kind: | ||
description: 'Be kind and do not scream if an exception occurs' | ||
description: Be kind and do not scream if an exception occurs | ||
required: false | ||
default: false | ||
runs: | ||
using: 'docker' | ||
image: 'Dockerfile' | ||
using: docker | ||
image: Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters