update
All checks were successful
Setup Native Action / native (3.12.7) (push) Has been skipped
Setup Native Action / docker (3.12.7) (push) Has been skipped

This commit is contained in:
hoangvv 2025-01-15 12:30:29 +07:00
parent fe70ae0c21
commit e518a141fb
2 changed files with 6 additions and 0 deletions

View File

@ -42,6 +42,11 @@ jobs:
docker:
if: contains(github.event.head_commit.message, '@docker')
runs-on: ubuntu-latest
env:
DB_USER: ${{ secrets.DB_USER }}
DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
DB_SERVER: ${{ vars.DB_SERVER }}
DB_PORT: ${{ vars.DB_PORT }}
strategy:
matrix:
python-version: [3.12.7]

View File

@ -14,6 +14,7 @@ def find_available_port(start_port=80):
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
while True:
try:
color_log.Show(3,f"Check port {start_port} for db server { os.getenv('DB_SERVER','localhost') }")
sock.bind((os.getenv('DB_SERVER','localhost'), start_port))
color_log.Show(3,f" {start_port} is Open")
return start_port