Skip to content
This repository was archived by the owner on Nov 2, 2021. It is now read-only.

Commit 2eac9b5

Browse files
committed
cd into directory before commit
1 parent 3d2e5be commit 2eac9b5

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

.github/workflows/example-sync.yaml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,11 @@ jobs:
1919
- name: Create new example
2020
run: |
2121
cargo generate --git https://github.com/rust-github/template.git --name rust-gh-example
22-
cd rust-gh-example
2322
2423
- name: replace username
2524
run: |
25+
cd rust-gh-example
2626
sed -i 's#{\[username\]}#MyUsername#g' $(find . -type f -name '*.md' -o -name '*.yml' -o -name '*.toml')
27-
cd ..
2827
2928
- name: Checkout old example
3029
uses: actions/checkout@v2
@@ -46,21 +45,20 @@ jobs:
4645
mkdir old_sources
4746
mv old_example/src/* old_sources
4847
cd old_example
49-
rm -rf *
48+
rm -rf * .gitignore .github/
5049
echo "ls ../rust-gh-example:"
5150
ls ../rust-gh-example
5251
echo "ls ../rust-gh-example/src:"
5352
ls ../rust-gh-example/src
54-
cp -r ../rust-gh-example/* .
53+
mv ../rust-gh-example/* ../rust-gh-example/.github ../rust-gh-example/.gitignore .
5554
echo "ls -al:"
5655
ls -al
5756
rm src/*
5857
mv ../old_sources/* src
5958
6059
- name: commit example
6160
run: |
62-
echo "pwd:"
63-
pwd
61+
cd old_example
6462
git config user.name github-actions
6563
git config user.email github-actions@github.com
6664
git add .

0 commit comments

Comments
 (0)