2023-08-05 00:06:09 +00:00
|
|
|
name: NodBot Production Dockerization
|
|
|
|
|
|
|
|
on:
|
2023-08-06 13:14:44 +00:00
|
|
|
pull_request:
|
2023-08-05 00:06:09 +00:00
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
|
|
|
|
env:
|
|
|
|
DHUB_UNAME: ${{ secrets.DHUB_UNAME }}
|
|
|
|
DHUB_PWORD: ${{ secrets.DHUB_PWORD }}
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
build:
|
|
|
|
|
|
|
|
runs-on: self-hosted
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Pull latest from Git
|
|
|
|
run: |
|
|
|
|
pwd
|
|
|
|
whoami
|
|
|
|
cd /root/nodbot
|
|
|
|
git pull
|
2023-08-08 18:39:32 +00:00
|
|
|
git checkout $GITHUB_HEAD_REF
|
2023-08-05 00:06:09 +00:00
|
|
|
- name: Build the Docker image
|
|
|
|
run: |
|
|
|
|
cd /root/nodbot
|
|
|
|
docker build . --file Dockerfile --tag v0idf1sh/nodbot
|
|
|
|
- name: Log into Docker Hub
|
|
|
|
run: docker login -u $DHUB_UNAME -p $DHUB_PWORD
|
|
|
|
- name: Push image to Docker Hub
|
|
|
|
run: |
|
|
|
|
cd /root/nodbot
|
|
|
|
docker push v0idf1sh/nodbot
|