From 91472b516e3b49285c170fadd2d916e827d5a7fa Mon Sep 17 00:00:00 2001 From: Vladimir Pikovski Date: Sat, 11 Nov 2023 19:11:19 +0200 Subject: [PATCH] wip --- .github/workflows/github-actions-demo.yml | 41 +++++++++++++++++------ 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml index 595dce59f..995db89f4 100644 --- a/.github/workflows/github-actions-demo.yml +++ b/.github/workflows/github-actions-demo.yml @@ -32,19 +32,38 @@ jobs: name: my-artifact path: ${{ github.workspace }}/myapp/target/*.jar - docker-image: - name: Publish to Docker Hub + + publish: runs-on: ubuntu-latest - needs: [build] - env: - NEXT_VERSION: ${{ needs.build.outputs.version }} + needs: build steps: - - uses: actions/checkout@v2 - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKER_UNAME }} - password: ${{ secrets.DOCKER_KEY }} + - 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_KEY }} | docker login -u ${{ secrets.DOCKER_UNAME }} --password-stdin + + + # docker-image: + # name: Publish to Docker Hub + # runs-on: ubuntu-latest + # needs: [build] + # env: + # NEXT_VERSION: ${{ needs.build.outputs.version }} + # steps: + # - uses: actions/checkout@v2 + # - name: Login to Docker Hub + # uses: docker/login-action@v3 + # with: + # username: ${{ secrets.DOCKER_UNAME }} + # password: ${{ secrets.DOCKER_KEY }} # - name: Build Docker image # uses: docker/build-push-action@v4