2022-12-02 17:16:43 +00:00
|
|
|
name: Docker Image CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ "main" ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ "main" ]
|
2022-12-02 17:28:32 +00:00
|
|
|
|
|
|
|
env:
|
2022-12-02 17:30:21 +00:00
|
|
|
DHUB_UNAME: ${{ secrets.DHUB_UNAME }}
|
|
|
|
DHUB_PWORD: ${{ secrets.DHUB_PWORD }}
|
2022-12-02 17:16:43 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
build:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Build the Docker image
|
2022-12-02 18:00:26 +00:00
|
|
|
run: docker build . --file Dockerfile --tag v0idf1sh/nodbot:$(date +%s)
|
2022-12-02 17:28:32 +00:00
|
|
|
- name: Log into Docker Hub
|
|
|
|
run: docker login -u $DHUB_UNAME -p $DHUB_PWORD
|
|
|
|
- name: Push image to Docker Hub
|
2022-12-02 18:00:26 +00:00
|
|
|
run: docker push v0idf1sh/nodbot:latest
|