workflow: rebuild again
Signed-off-by: supphakitd <67319010028@technictrang.ac.th>
This commit is contained in:
@@ -3,6 +3,26 @@ run-name: Build Docker Image
|
|||||||
on: [push]
|
on: [push]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
Build Docker Image:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Install system dependencies
|
||||||
|
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
|
||||||
Restart Docker Compose:
|
Restart Docker Compose:
|
||||||
runs-on: host
|
runs-on: host
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
Reference in New Issue
Block a user