Update .gitea/workflows/dev-docker.yml
This commit is contained in:
parent
d06cac6f3d
commit
80f89d0117
@ -1,9 +1,9 @@
|
|||||||
name: NodBot Production Dockerization
|
name: NodBot PE Dockerization
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v*-prod*'
|
- 'v*-dev*'
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DHUB_UNAME: ${{ secrets.DHUB_UNAME }}
|
DHUB_UNAME: ${{ secrets.DHUB_UNAME }}
|
||||||
@ -21,25 +21,26 @@ jobs:
|
|||||||
mkdir -p /var/lib/act_runner/
|
mkdir -p /var/lib/act_runner/
|
||||||
cd /var/lib/act_runner/
|
cd /var/lib/act_runner/
|
||||||
if [ ! -d "nodbot" ]; then
|
if [ ! -d "nodbot" ]; then
|
||||||
git clone https://git.vfsh.dev/voidf1sh/nodbot
|
git clone https://git.vfsh.dev/voidf1sh/nodbot-dev
|
||||||
cd nodbot
|
cd nodbot-dev
|
||||||
else
|
else
|
||||||
cd nodbot
|
cd nodbot-dev
|
||||||
|
git checkout main
|
||||||
git pull
|
git pull
|
||||||
fi
|
fi
|
||||||
git checkout tags/${{ gitea.ref_name }}
|
git checkout tags/${{ gitea.ref_name }}
|
||||||
- name: Build the Docker image
|
- name: Build the Docker image
|
||||||
run: |
|
run: |
|
||||||
cd /var/lib/act_runner/nodbot
|
cd /var/lib/act_runner/nodbot-dev
|
||||||
docker build . --file Dockerfile --tag v0idf1sh/nodbot
|
docker build . --file Dockerfile --tag v0idf1sh/nodbot-dev
|
||||||
- name: Log into Docker Hub
|
- name: Log into Docker Hub
|
||||||
run: docker login -u $DHUB_UNAME -p $DHUB_PWORD
|
run: docker login -u $DHUB_UNAME -p $DHUB_PWORD
|
||||||
- name: Push image to Docker Hub
|
- name: Push image to Docker Hub
|
||||||
run: |
|
run: |
|
||||||
cd /var/lib/act_runner/nodbot
|
cd /var/lib/act_runner/nodbot-dev
|
||||||
docker push v0idf1sh/nodbot
|
docker push v0idf1sh/nodbot-dev
|
||||||
- name: Restart the container
|
- name: Restart the container
|
||||||
run: |
|
run: |
|
||||||
cd /srv/docker/nodbot
|
cd /srv/docker/nodbot-dev
|
||||||
docker-compose down
|
docker-compose down
|
||||||
docker-compose up -d
|
docker-compose up -d
|
Loading…
Reference in New Issue
Block a user