diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml index 7de7424c9..e100329e2 100644 --- a/.github/workflows/github-actions-demo.yml +++ b/.github/workflows/github-actions-demo.yml @@ -67,39 +67,12 @@ jobs: push: true tags: vladipiko/app:latest - # - name: Push Docker Image to Docker Hub - # run: | - # docker login -u ${{ secrets.DOCKER_UNAME }} -p ${{ secrets.DOCKER_KEY }} - # docker push my-docker-image:1.0.1 - - - # publish: - # runs-on: ubuntu-latest - # needs: build - - # steps: - # - name: Checkout Code - # uses: actions/checkout@v4 - - # - name: Build Docker Image - # run: | - # ls -l - # docker build -t my-docker-image:${{ github.run_number }} -f ${{ github.workspace }}/Dockerfile . - # docker tag my-docker-image:${{ github.run_number }} my-docker-image:$APP_VERSION - - # - name: Push Docker Image to Docker Hub - # run: | - # echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin - # docker push my-docker-image:${{ github.run_number }} - # docker push my-docker-image:1.0.1 - # docker push my-docker-image:latest - - # deploy: - # runs-on: ubuntu-latest - # needs: publish - # steps: - # - name: Download and Run Docker Image - # run: | - # docker pull my-docker-image:1.0.1 - # docker run --rm -it -p 8080:8080 my-docker-image:1.0.1 + deploy: + runs-on: ubuntu-latest + needs: publish + steps: + - name: Download and Run Docker Image + run: | + docker pull app:latest + docker run --rm -it -p 8080:8080 app:latest