File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Sync to NCP SourceCommit
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+
7+ jobs :
8+ sync :
9+ runs-on : ubuntu-latest
10+
11+ steps :
12+ - name : Checkout code
13+ uses : actions/checkout@v4
14+ with :
15+ fetch-depth : 0
16+
17+ - name : Setup SSH for NCP SourceCommit
18+ run : |
19+ mkdir -p ~/.ssh/
20+ echo "${{ secrets.NCP_SOURCECOMMIT_SSH_KEY }}" > ~/.ssh/ncp_private_key
21+ chmod 600 ~/.ssh/ncp_private_key
22+
23+ cat <<EOF >> ~/.ssh/config
24+ Host devtools.ncloud.com
25+ User ${{ secrets.NCP_SOURCECOMMIT_USER }}
26+ IdentityFile ~/.ssh/ncp_private_key
27+ HostkeyAlgorithms +ssh-rsa
28+ PubkeyAcceptedAlgorithms +ssh-rsa
29+ EOF
30+
31+ ssh-keyscan -H devtools.ncloud.com >> ~/.ssh/known_hosts
32+
33+ - name : Test SSH Connection (after setting up key)
34+ run : ssh -v devtools.ncloud.com || true
35+
36+ - name : Push to NCP SourceCommit
37+ run : |
38+ git remote add ncp "ssh://devtools.ncloud.com/3067145/fn-edu-service.git"
39+ git push ncp main --force
You can’t perform that action at this time.
0 commit comments