Skip to content

Commit 3130c7a

Browse files
authored
ci: improve CI workflow for private repository cloning (#241)
- Add a new job for git clone and pull in CI - Clone a private repository in CI with secrets - Remove a directory in the cloned repository ref: #65
1 parent 2b7de38 commit 3130c7a

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.github/workflows/ci.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,3 +197,22 @@ jobs:
197197
echo "I am $TEST_BAR, thanks"
198198
echo "I am $BAR, thanks"
199199
echo "I am $TEST_AAA, thanks"
200+
201+
testing03:
202+
name: git clone and pull
203+
runs-on: ubuntu-latest
204+
steps:
205+
- name: checkout
206+
uses: actions/checkout@v1
207+
208+
- name: clone private repository
209+
uses: ./
210+
with:
211+
host: ${{ secrets.HOST }}
212+
username: ${{ secrets.USERNAME }}
213+
key: ${{ secrets.KEY }}
214+
port: ${{ secrets.PORT }}
215+
script_stop: true
216+
script: |
217+
git clone https://appleboy:${{ secrets.TEST_TOKEN }}@github.com/go-training/self-runner.git test_repository
218+
rm -rf test_repository

0 commit comments

Comments
 (0)