-
-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (56 loc) · 1.97 KB
/
theme-customs.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Sync Theme Customs
on:
schedule:
- cron: '0 0 * * 1'
workflow_dispatch:
inputs:
main_repo_branch:
description: 'Theme Customs'
default: 'for2.1'
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout current repository
uses: actions/checkout@v2
- name: List files in the environment
run: |
ls -la $GITHUB_WORKSPACE
- name: Create temporary directory
run: |
mkdir temp_clone
- name: Clone main-repo
uses: actions/checkout@v2
with:
repository: SMFTricks/Theme-Customs
ref: ${{ github.event.inputs.main_repo_branch }}
token: ${{ secrets.THEME_CUSTOMS }}
path: temp_clone
- name: Copy main-repo contents to new directory
run: |
rsync -av --exclude='.git' --exclude=".github" --exclude="crowdin.yml" --exclude="README.md" --exclude='.gitignore' --delete-before --ignore-times temp_clone/ $GITHUB_WORKSPACE/_theme-customs
- name: Verify GitHub Workspace Contents
run: ls -la $GITHUB_WORKSPACE
- name: Clean up temporary directory
run: |
rm -rf temp_clone
- name: Move contents to root
run: |
rsync -av --remove-source-files $GITHUB_WORKSPACE/_theme-customs/ $GITHUB_WORKSPACE/
rm -r $GITHUB_WORKSPACE/_theme-customs
- name: Set up Git
run: |
git config --global user.name "DiegoAndresCortes"
git config --global user.email "[email protected]"
- name: Add changes to Git staging area
run: |
git status
- name: Add changes to Git staging area
run: |
git add .
- name: Commit changes
run: |
git commit -m "Update Theme-Customs" -m "Signed-off-by: Diego Andrés <[email protected]>" || true
- name: Push changes to origin
run: |
git push origin HEAD