forked from cpina/github-action-push-to-another-repository
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathaction.yml
50 lines (50 loc) · 1.97 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
48
49
50
name: 'Push directory to another repository'
description: 'Useful to push files to another repository to be used, for example, via github pages'
inputs:
source-directory:
description: 'Source directory from the origin directory'
required: true
destination-github-username:
description: 'Name of the destination username/organization'
required: true
destination-repository-name:
description: 'Destination repository'
required: true
destination-repository-folder:
description: "[Optional] Path to the folder of the destination repository the files should be committed"
required: false
default: "/"
user-email:
description: 'Email for the git commit'
required: true
# user-name:
# description: "Sets: git config --global user.name"
# required: true
destination-repository-username:
description: '[Optional] Username/organization for the destination repository'
required: false
default: ''
target-branch:
description: '[Optional] set target branch name for the destination repository. Defaults to "master"'
default: 'master'
required: false
commit-message:
description: "[Optional] commit message for the output repository. DEFAULT: Updated $DESTINATION_GITHUB_REPOSITORY_NAME from $GITHUB_REPOSITORY with user $USER_EMAIL"
required: false
runs:
using: "composite"
steps:
- run: ${{ github.action_path }}/entrypoint.sh
shell: bash
env:
SOURCE_DIRECTORY: ${{ inputs.source-directory }}
DESTINATION_REPOSITORY_USERNAME: ${{ inputs.destination-github-username }}
DESTINATION_REPOSITORY_NAME: ${{ inputs.destination-repository-name }}
DESTINATION_REPOSITORY_FOLDER: ${{ inputs.destination-repository-folder }}
USER_EMAIL: ${{ inputs.user-email }}
USER_NAME: ${{ inputs.destination-github-username }}
TARGET_BRANCH: ${{ inputs.target-branch }}
COMMIT_MESSAGE: ${{ inputs.commit-message }}
branding:
icon: 'git-commit'
color: 'green'