Update wiki/action.yaml
This commit is contained in:
parent
a46a6fb4be
commit
15291113ec
@ -2,41 +2,41 @@ name: Publish Wiki
|
|||||||
desciption: Publish Wiki
|
desciption: Publish Wiki
|
||||||
|
|
||||||
inputs:
|
inputs:
|
||||||
url:
|
url:
|
||||||
type: string
|
type: string
|
||||||
required: false
|
required: false
|
||||||
description: Repository URL that will be cloned
|
description: Repository URL that will be cloned
|
||||||
default: ${{github.server_url}}/${{github.repository}}.wiki.git
|
default: ${{github.server_url}}/${{github.repository}}.wiki.git
|
||||||
token:
|
token:
|
||||||
type: string
|
type: string
|
||||||
required: false
|
required: false
|
||||||
description: Authentication token
|
description: Authentication token
|
||||||
default: ${{github.token}}
|
default: ${{github.token}}
|
||||||
pattern:
|
pattern:
|
||||||
type: string
|
type: string
|
||||||
required: false
|
required: false
|
||||||
description: Directory to upload to wiki
|
description: Directory to upload to wiki
|
||||||
default: docs
|
default: docs
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
- name: Creat authorized Git URL
|
- name: Creat authorized Git URL
|
||||||
run: echo "URL=$(echo ${{inputs.url}} | sed s%://%://${{inputs.token}}@% )" >> $GITHUB_ENV
|
run: echo "URL=$(echo ${{inputs.url}} | sed s%://%://${{inputs.token}}@% )" >> $GITHUB_ENV
|
||||||
shell: sh
|
shell: sh
|
||||||
|
|
||||||
- name: Clone repository
|
- name: Clone repository
|
||||||
uses: docker://alpine/git
|
uses: docker://alpine/git
|
||||||
with:
|
with:
|
||||||
entrypoint: git
|
entrypoint: git
|
||||||
args: clone "${{env.URL}}" wiki
|
args: clone "${{env.URL}}" wiki
|
||||||
|
|
||||||
- name: Update files
|
- name: Update files
|
||||||
run: mv -f ${{inputs.pattern}} wiki/
|
run: mv -f ${{inputs.pattern}} wiki/
|
||||||
shell: sh
|
shell: sh
|
||||||
|
|
||||||
= name: Push
|
- name: Push
|
||||||
uses: docker://alpine/git
|
uses: docker://alpine/git
|
||||||
with:
|
with:
|
||||||
entrypoint: git
|
entrypoint: git
|
||||||
args: sh -c "cd wiki && git add . && git commit -m Automated wiki update && git push"
|
args: sh -c "cd wiki && git add . && git commit -m Automated wiki update && git push"
|
||||||
|
Loading…
Reference in New Issue
Block a user