test: check git clone connectivity
This commit is contained in:
parent
6433532a28
commit
d4530682f9
1 changed files with 27 additions and 0 deletions
27
.forgejo/workflows/test-clone.yml
Normal file
27
.forgejo/workflows/test-clone.yml
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
name: Test Git Clone
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main, master]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: docker
|
||||
steps:
|
||||
- name: Test clone
|
||||
run: |
|
||||
echo "Testing DNS..."
|
||||
nslookup git.khoavo.myds.me || echo "DNS failed"
|
||||
echo "---"
|
||||
echo "Testing curl..."
|
||||
curl -s -o /dev/null -w "%{http_code}" https://git.khoavo.myds.me/vndangkhoa/kv-tube || echo "curl failed"
|
||||
echo ""
|
||||
echo "---"
|
||||
echo "Testing git clone..."
|
||||
git clone https://git.khoavo.myds.me/vndangkhoa/kv-tube.git /tmp/test-clone 2>&1 || echo "Clone failed"
|
||||
echo "---"
|
||||
if [ -d /tmp/test-clone ]; then
|
||||
echo "Clone succeeded!"
|
||||
cd /tmp/test-clone && git log --oneline -3
|
||||
fi
|
||||
Loading…
Reference in a new issue