mirror of
https://gitea.com/actions/appleboy-ssh-action.git
synced 2024-11-22 18:19:36 +01:00
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: https://github.com/appleboy/ssh-action/issues/65
This commit is contained in:
parent
2b7de38eed
commit
3130c7a2bc
1 changed files with 19 additions and 0 deletions
19
.github/workflows/ci.yml
vendored
19
.github/workflows/ci.yml
vendored
|
@ -197,3 +197,22 @@ jobs:
|
||||||
echo "I am $TEST_BAR, thanks"
|
echo "I am $TEST_BAR, thanks"
|
||||||
echo "I am $BAR, thanks"
|
echo "I am $BAR, thanks"
|
||||||
echo "I am $TEST_AAA, thanks"
|
echo "I am $TEST_AAA, thanks"
|
||||||
|
|
||||||
|
testing03:
|
||||||
|
name: git clone and pull
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@v1
|
||||||
|
|
||||||
|
- name: clone private repository
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
host: ${{ secrets.HOST }}
|
||||||
|
username: ${{ secrets.USERNAME }}
|
||||||
|
key: ${{ secrets.KEY }}
|
||||||
|
port: ${{ secrets.PORT }}
|
||||||
|
script_stop: true
|
||||||
|
script: |
|
||||||
|
git clone https://appleboy:${{ secrets.TEST_TOKEN }}@github.com/go-training/self-runner.git test_repository
|
||||||
|
rm -rf test_repository
|
||||||
|
|
Loading…
Reference in a new issue