Update .github/workflows/pe-docker.yml
Some checks failed
NodBot PE Dockerization / build (push) Failing after 1m56s
Some checks failed
NodBot PE Dockerization / build (push) Failing after 1m56s
Match from pe branch
This commit is contained in:
parent
2a3b53ea08
commit
8f7ed605a4
28
.github/workflows/pe-docker.yml
vendored
28
.github/workflows/pe-docker.yml
vendored
@ -1,9 +1,9 @@
|
|||||||
name: NodBot Production Dockerization
|
name: NodBot PE Dockerization
|
||||||
|
|
||||||
on:
|
on:
|
||||||
commit:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- pe
|
- main
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DHUB_UNAME: ${{ secrets.DHUB_UNAME }}
|
DHUB_UNAME: ${{ secrets.DHUB_UNAME }}
|
||||||
@ -13,23 +13,35 @@ jobs:
|
|||||||
|
|
||||||
build:
|
build:
|
||||||
|
|
||||||
runs-on: self-hosted
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Pull latest from Git
|
- name: Pull latest from Git
|
||||||
run: |
|
run: |
|
||||||
pwd
|
pwd
|
||||||
whoami
|
whoami
|
||||||
cd /root/nodbot
|
mkdir -p /var/lib/act_runner/
|
||||||
|
cd /var/lib/act_runner/
|
||||||
|
if [ ! -d "nodbot" ]; then
|
||||||
|
git clone https://git.vfsh.dev/voidf1sh/nodbot
|
||||||
|
cd nodbot
|
||||||
|
else
|
||||||
|
cd nodbot
|
||||||
git pull
|
git pull
|
||||||
git checkout pe
|
fi
|
||||||
|
git checkout ${{ gitea.ref}}
|
||||||
- name: Build the Docker image
|
- name: Build the Docker image
|
||||||
run: |
|
run: |
|
||||||
cd /root/nodbot
|
cd /var/lib/act_runner/nodbot
|
||||||
docker build . --file Dockerfile --tag v0idf1sh/nodbot-pe
|
docker build . --file Dockerfile --tag v0idf1sh/nodbot-pe
|
||||||
- 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 /root/nodbot
|
cd /var/lib/act_runner/nodbot
|
||||||
docker push v0idf1sh/nodbot-pe
|
docker push v0idf1sh/nodbot-pe
|
||||||
|
- name: Restart the container
|
||||||
|
run: |
|
||||||
|
cd /srv/docker/nodbot-pe
|
||||||
|
docker-compose down
|
||||||
|
docker-compose up -d
|
Loading…
Reference in New Issue
Block a user