ci: updated
Release package / release (pull_request) Failing after 16s
Java CI with Maven / build-and-test (pull_request) Has been cancelled

This commit is contained in:
TakahashiNg
2026-04-08 13:13:19 +00:00
parent d298918e4f
commit e669f9c8b6
+2 -17
View File
@@ -14,29 +14,14 @@ jobs:
permissions:
contents: write
steps:
- uses: gerlero/apt-install@v1
with:
packages: openssh-client
- name: Calculate and Export Target IP
run: |
# 1. Lấy IP hiện tại và tính toán IP đích (đổi octet cuối thành .1)
RUNNER_IP=$(hostname -I | awk '{print $1}')
CALCULATED_IP=$(echo $RUNNER_IP | cut -d'.' -f1-3).1
# 2. Đưa vào biến môi trường toàn cục của Job
echo "TARGET_IP=${CALCULATED_IP}" >> $GITHUB_ENV
- name: Setup SSH Key
run: |
set -x
mkdir -p ~/.ssh
chmod 700 ~/.ssh
echo "${{ secrets.DEPLOY_KEY }}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan -p 222 -t ed25519 $TARGET_IP >> ~/.ssh/known_hosts
ssh-keyscan -p 222 -t ed25519 vps.demonkernel.io.vn >> ~/.ssh/known_hosts
- uses: actions/checkout@v6
with:
@@ -79,7 +64,7 @@ jobs:
REPO_NAME="${{ gitea.repository }}"
git remote set-url origin ssh://git@$TARGET_IP:222/${REPO_NAME}.git
git remote set-url origin ssh://git@vps.demonkernel.io.vn/${REPO_NAME}.git
git rm -r --cached .
git add .