-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (49 loc) · 1.87 KB
/
github_directorySync.yml
File metadata and controls
51 lines (49 loc) · 1.87 KB
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
51
name: DirectorySync
on:
workflow_call:
secrets:
token:
required: true
inputs:
source:
type: string
description: 'Directory Source'
required: true
targetRepo:
type: string
description: 'Target Repository'
required: true
targetDirectory:
type: string
description: 'Target Directory'
required: true
targetDirectoryName:
type: string
description: 'Target Directory Name'
required: false
default: 'empty_value'
commitMessage:
type: string
description: 'Commit Message'
required: false
default: '[Automated] DirectorySync'
jobs:
DirectorySync:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
# Copy the 'post' folder
- name: DirectorySync
uses: encoredigitalgroup/copy_file_to_another_repo_action@main
env:
API_TOKEN_GITHUB: ${{ secrets.token }}
with:
source_files: ${{inputs.source}}
destination_repo: ${{inputs.targetRepo}} # Target repo
destination_folder: ${{inputs.targetDirectory}} # Folder where to copy it
destination_folder_name: ${{inputs.targetDirectoryName}} # Folder where to copy it
user_email: ghbot@encoredigitalgroup.com
user_name: "EncoreBot"
commit_message: ${{inputs.commitMessage}} # Input ${{ github.event.head_commit.message }} to preserve the original commit message
push_with_force: true