From 6c9d776a081e12ef8f717cc200307f86e81faa3e Mon Sep 17 00:00:00 2001 From: "AmirH.Najafizadeh" Date: Sun, 13 Aug 2023 13:37:27 +0330 Subject: [PATCH] Update push-docker-image.yaml --- .github/workflows/push-docker-image.yaml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/push-docker-image.yaml b/.github/workflows/push-docker-image.yaml index c3e6447..b21f7c1 100644 --- a/.github/workflows/push-docker-image.yaml +++ b/.github/workflows/push-docker-image.yaml @@ -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