Compare commits
No commits in common. "9d9a1447f3fad3d39bac5f971ee7576b1f458d5b" and "65470f2c57e5db97a5349afc8c210a5546937e64" have entirely different histories.
9d9a1447f3
...
65470f2c57
@ -10,12 +10,14 @@ env:
|
|||||||
DHUB_PWORD: ${{ secrets.DHUB_PWORD }}
|
DHUB_PWORD: ${{ secrets.DHUB_PWORD }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
build:
|
build:
|
||||||
|
|
||||||
runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Pull latest from Git
|
- name: Pull latest from Git
|
||||||
run: |
|
run: |
|
||||||
echo "Branch: ${{ gitea.head_ref }}"
|
|
||||||
pwd
|
pwd
|
||||||
whoami
|
whoami
|
||||||
mkdir -p /var/lib/act_runner/
|
mkdir -p /var/lib/act_runner/
|
||||||
@ -27,7 +29,7 @@ jobs:
|
|||||||
cd nodbot
|
cd nodbot
|
||||||
git pull
|
git pull
|
||||||
fi
|
fi
|
||||||
git checkout ${{ gitea.head_ref }}
|
git checkout ${{ gitea.ref}}
|
||||||
- name: Build the Docker image
|
- name: Build the Docker image
|
||||||
run: |
|
run: |
|
||||||
cd /var/lib/act_runner/nodbot
|
cd /var/lib/act_runner/nodbot
|
||||||
|
@ -3,43 +3,33 @@ name: NodBot Production Dockerization
|
|||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DHUB_UNAME: ${{ secrets.DHUB_UNAME }}
|
DHUB_UNAME: ${{ secrets.DHUB_UNAME }}
|
||||||
DHUB_PWORD: ${{ secrets.DHUB_PWORD }}
|
DHUB_PWORD: ${{ secrets.DHUB_PWORD }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
build:
|
build:
|
||||||
|
|
||||||
runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Pull latest from Git
|
- name: Pull latest from Git
|
||||||
run: |
|
run: |
|
||||||
echo "Branch: ${{ gitea.head_ref }}"
|
|
||||||
pwd
|
pwd
|
||||||
whoami
|
whoami
|
||||||
mkdir -p /var/lib/act_runner/
|
cd /root/nodbot
|
||||||
cd /var/lib/act_runner/
|
git pull
|
||||||
if [ ! -d "nodbot" ]; then
|
git checkout $GITHUB_HEAD_REF
|
||||||
git clone https://git.vfsh.dev/voidf1sh/nodbot
|
|
||||||
cd nodbot
|
|
||||||
else
|
|
||||||
cd nodbot
|
|
||||||
git pull
|
|
||||||
fi
|
|
||||||
git checkout ${{ gitea.head_ref }}
|
|
||||||
- name: Build the Docker image
|
- name: Build the Docker image
|
||||||
run: |
|
run: |
|
||||||
cd /var/lib/act_runner/nodbot
|
cd /root/nodbot
|
||||||
docker build . --file Dockerfile --tag v0idf1sh/nodbot
|
docker build . --file Dockerfile --tag v0idf1sh/nodbot
|
||||||
- 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 /root/nodbot
|
||||||
docker push v0idf1sh/nodbot
|
docker push v0idf1sh/nodbot
|
||||||
- name: Restart the container
|
|
||||||
run: |
|
|
||||||
cd /srv/docker/nodbot
|
|
||||||
docker-compose down
|
|
||||||
docker-compose up -d
|
|
Loading…
Reference in New Issue
Block a user