Skip to content

Commit

Permalink
Update push-docker-image.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
amirhnajafiz authored Aug 13, 2023
1 parent 00b0ef3 commit 6c9d776
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/push-docker-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ 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: Get current date # get the date of the build
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d--%M-%S')"
- name: Build the Docker image # push The image to the docker hub
run: docker build . --file build/Dockerfile --tag $DOCKER_USER/$REPO_NAME:$RELEASE_VERSION
- name: Docker Push
run: docker push $DOCKER_USER/$REPO_NAME:$RELEASE_VERSION
- 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: Get current date # get the date of the build
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d--%M-%S')"
- name: Build the Docker image # push The image to the docker hub
run: docker build . --file build/Dockerfile --tag $DOCKER_USER/$REPO_NAME:$RELEASE_VERSION
- name: Docker Push
run: docker push $DOCKER_USER/$REPO_NAME:$RELEASE_VERSION

0 comments on commit 6c9d776

Please sign in to comment.