CI/CD
Implement github actions to build and push the docker image
This commit is contained in:
parent
b9332ec602
commit
c5ab2681b3
9
.github/workflows/docker-image.yml
vendored
9
.github/workflows/docker-image.yml
vendored
@ -5,6 +5,10 @@ on:
|
|||||||
branches: [ "main" ]
|
branches: [ "main" ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ "main" ]
|
branches: [ "main" ]
|
||||||
|
|
||||||
|
env:
|
||||||
|
DHUB_UNAME: {{ secrets.DHUB_UNAME }}
|
||||||
|
DHUB_PWORD: {{ secrets.DHUB_PWORD }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
@ -16,4 +20,7 @@ jobs:
|
|||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Build the Docker image
|
- name: Build the Docker image
|
||||||
run: docker build . --file Dockerfile --tag v0idf1sh/nodbot:$(date +%s)
|
run: docker build . --file Dockerfile --tag v0idf1sh/nodbot:$(date +%s)
|
||||||
run: docker login
|
- name: Log into Docker Hub
|
||||||
|
run: docker login -u $DHUB_UNAME -p $DHUB_PWORD
|
||||||
|
- name: Push image to Docker Hub
|
||||||
|
run: docker push v0idf1sh/nodbot:latest
|
||||||
|
Loading…
Reference in New Issue
Block a user