Workflow: added execpipe/hostpipe from micro-service-api
Signed-off-by: supphakitd <67319010028@technictrang.ac.th>
This commit is contained in:
@@ -31,10 +31,10 @@ jobs:
|
|||||||
set -e
|
set -e
|
||||||
docker image rm -f accounting-frontend:latest
|
docker image rm -f accounting-frontend:latest
|
||||||
docker build . -t accounting-frontend:latest
|
docker build . -t accounting-frontend:latest
|
||||||
# restart compose
|
Restart Docker Compose:
|
||||||
- name: Restart compose
|
runs-on: host
|
||||||
|
steps:
|
||||||
|
- name: Restart compose project
|
||||||
run: |
|
run: |
|
||||||
curl -X POST http://host.docker.internal:3000/run \
|
echo '(cd frontend-development-kickstarter && ddd && ddd && ddud)' > /hostpipe
|
||||||
-H "Content-Type: application/json" \
|
|
||||||
-H "X-SECRET: ${{ secrets.EXPRESS_SECRET }}" \
|
|
||||||
-d '{"command": "cd $HOME/frontend-development-kickstarter && ddd && ddud"}'
|
|
||||||
6
listen-pipe.sh
Normal file
6
listen-pipe.sh
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
trap "rm -f $HOME/execpipe" EXIT
|
||||||
|
trap "rm -f $HOME/execpipe" ERR
|
||||||
|
|
||||||
|
mkfifo $HOME/execpipe
|
||||||
|
while true; do eval "$(cat $HOME/execpipe)"; done
|
||||||
Reference in New Issue
Block a user