Workflow: test pinging to ensure that can reach watcherd
Some checks failed
Build Docker Image / Build Docker Image (push) Failing after 17s

Signed-off-by: supphakitd <67319010028@technictrang.ac.th>
This commit is contained in:
2025-11-24 14:10:25 +07:00
parent 10b45d8439
commit cb846dd346

View File

@@ -8,26 +8,7 @@ jobs:
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Install system dependencies
- name: Test pinging host.docker.internal
run: |
# change mirror to kku.ac.th for faster package downloading
sudo sed -i 's@http://archive.ubuntu.com@http://mirror.kku.ac.th@g' /etc/apt/sources.list.d/ubuntu.sources
sudo apt update && sudo apt install nodejs npm curl -y
- name: Build docker image
run: |
mv Dockerfile ../
mv entrypoint ../
cd ../
set +e
docker rm $(docker stop $(docker ps -a -q --filter ancestor=accounting-api:latest --format="{{.ID}}"))
set -e
docker image rm -f accounting-api:latest
docker build . -t accounting-api:latest
- name: Restart compose
run: |
curl -X POST http://host.docker.internal:3000/run \
-H "Content-Type: application/json" \
-H "X-SECRET: ${{ secrets.EXPRESS_SECRET }}" \
-d '{"command": "cd $HOME/backend-development-kickstarter && ddd && ddud"}'
ping host.docker.internal