mirror of
https://github.com/SrIzan10/nodejs-java13.git
synced 2026-06-11 00:12:32 +00:00
dockerfile and ci added
This commit is contained in:
19
.github/workflows/dockerpush.yml
vendored
Normal file
19
.github/workflows/dockerpush.yml
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
name: Push to docker.
|
||||
on: [push] # When pushing to any branch then run this action
|
||||
# Env variable
|
||||
env:
|
||||
DOCKER_USER: ${{secrets.DOCKER_USER}}
|
||||
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
|
||||
REPO_NAME: ${{secrets.REPO_NAME}}
|
||||
jobs:
|
||||
push-image-to-docker-hub: # job name
|
||||
runs-on: ubuntu-latest # runner name : (ubuntu latest version)
|
||||
steps:
|
||||
- uses: actions/checkout@v2 # first action : checkout source code
|
||||
- name: docker login
|
||||
run: | # log into docker hub account
|
||||
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
|
||||
- name: Build the Docker image # push The image to the docker hub
|
||||
run: docker build . --file Dockerfile --tag $DOCKER_USER/$REPO_NAME:latest
|
||||
- name: Docker Push
|
||||
run: docker push $DOCKER_USER/$REPO_NAME:latest
|
||||
Reference in New Issue
Block a user