voidbot/.github/workflows/docker-image.yml

36 lines
738 B
YAML
Raw Normal View History

name: voidbot Production Dockerization
2023-02-10 04:25:25 +00:00
on:
push:
branches:
- main
merge:
branches:
- main
2023-02-10 04:25:25 +00:00
env:
DHUB_UNAME: ${{ secrets.DHUB_UNAME }}
DHUB_PWORD: ${{ secrets.DHUB_PWORD }}
jobs:
build:
runs-on: self-hosted
2023-02-10 04:25:25 +00:00
steps:
- name: Pull latest from Git
run: |
cd /root/voidbot
git pull
git checkout $GITHUB_HEAD_REF
2023-02-10 04:25:25 +00:00
- name: Build the Docker image
run: |
cd /root/voidbot
docker build . --file Dockerfile --tag v0idf1sh/voidbot
2023-02-10 04:25:25 +00:00
- name: Log into Docker Hub
run: docker login -u $DHUB_UNAME -p $DHUB_PWORD
- name: Push image to Docker Hub
run: |
cd /root/voidbot
docker push v0idf1sh/voidbot