Skip to content

Commit

Permalink
✨ New Options
Browse files Browse the repository at this point in the history
  • Loading branch information
JumperBot committed Jul 19, 2022
1 parent 7f54ce0 commit 12f7ed7
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 10 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: CI
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.4.2
- uses: ./
with:
branch: "master"
message: ":boom: Testing"
preserve-readme: true
readme-file: "README.md"
readme-message: "no problemo"
7 changes: 6 additions & 1 deletion Obliterator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ mv .git/ workspace/
cd workspace

if [ $3 = true ]; then
git restore README.*
git restore $4
fi

if [ "$5" != "" ]; then
echo >> $4
echo -e "$5" >> $4
fi

if [ -n "$(git status --porcelain)" ]; then
Expand Down
21 changes: 16 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,24 @@ Add this to your `Actions`:

```yaml
- name: Obliterate-Repository
uses: JumperBot/Obliterate-Repository@v1.1
uses: JumperBot/Obliterate-Repository@v1.2
with:
branch: "dev-branch" # defaults to master
message: ":boom: End Game Commit" # defaults to :boom: Obliterated!
preserve-readme: true # defaults to: false
# defaults to master
branch: "dev-branch"

# defaults to :boom: Obliterated!
message: ":boom: End Game Commit"

# defaults to false
preserve-readme: true

# defaults to README.md
readme-file: "README.amd"

# defaults to nothing
readme-message: "readme"
```
#License
# License
This is licensed under the [MIT LICENSE](./LICENSE)
18 changes: 14 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,27 @@ inputs:
required: false
default: "master"
message:
description: "The commit message to pass with: git commit -a -m"
description: "The commit message to pass before git push"
required: false
default: ":boom: Obliterated!"
preserve-readme:
decription: "At least 1 root/README.* will be preserved"
decription: "README file will be preserved"
requied: false
default: false
readme-file:
description: "One README file to be recognized"
required: false
default: "README.md"
readme-message:
decription: "Add/create README with the specified message"
requied: false
default: ""
runs:
using: "docker"
image: "Dockerfile"
args:
- ${{ inputs.branch }}
- ${{ inputs.message }}
- ${{ inputs.preserve-readme }}
- ${{ inputs.message }}
- ${{ inputs.preserve-readme }}
- ${{ inputs.readme-file }}
- ${{ inputs.readme-message }}

0 comments on commit 12f7ed7

Please sign in to comment.