-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
31 lines (31 loc) · 992 Bytes
/
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
name: Perform OpenVic Commit of Files
description: Perform OpenVic Commit of Files
inputs:
target-repo-name:
description: ""
required: true
copy-source:
description: ""
required: true
target-branch:
description: ""
default: "master"
commit-message:
description: ""
default: "Automatic publish from github.com/${{ inputs.target-repo-name }}"
current-directory:
description: ""
default: "./"
runs:
using: "composite"
steps:
- name: Perform Commit and Push
shell: bash
run: |
cd ${{ inputs.current-directory }}
git clone https://.:${{ secrets.GITHUB_TOKEN }}@github.com/${{ inputs.target-repo-name }} ${{ inputs.target-repo-name }}
yes | cp -rf ${{ inputs.copy-source }} ${{ inputs.target-repo-name }}
cd ${{ inputs.target-repo-name }}
git add -A .
git diff-index --quiet HEAD || git commit -m "${{ inputs.commit-message }}"
git push origin ${{ inputs.target-branch }}