-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (34 loc) · 1.09 KB
/
sync_changes.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
name: Sync Specific Folder
on:
repository_dispatch:
types:
- webhook
jobs:
sync-folder:
runs-on: ubuntu-latest
steps:
- name: Checkout Test Repository
uses: actions/checkout@v3
with:
path: 'ChaCuN-tests'
- name: Checkout Main Repository
uses: actions/checkout@v3
with:
repository: 'simon-valerio-epfl/ChaCuN'
token: ${{ secrets.PAT }}
path: 'ChaCuN'
- name: Configure Git
run: |
git config --global user.email "[email protected]"
git config --global user.name "Schinc"
- name: Sync Changes to Specific Folder
run: |
cd ChaCuN-tests
rm -rf *.java
rm -rf *.csv
cp -R ../ChaCuN/test/ch/epfl/chacun/* .
for i in *; do sed -i "s/${i%.java}/ChickenAttacker${i%.java}/g" "$i"; done
for i in $(ls); do mv $i "ChickenAttacker$i"; done
git add .
git commit -m "Add tests"
git push https://androz2091:${{ secrets.PAT }}@github.com/simon-valerio-epfl/ChaCuN-tests.git HEAD:master