diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a1787a5..105b666 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,25 +17,25 @@ jobs: - run: make build - run: make test - # deploy: - # needs: build - # runs-on: ubuntu-latest - # if: ${{ github.event_name == 'push' }} - # - # steps: - # - uses: actions/checkout@v2 - # - # - uses: docker/setup-buildx-action@v1 - # - # - uses: docker/login-action@v1 - # with: - # username: ${{ secrets.DOCKER_USERNAME }} - # password: ${{ secrets.DOCKER_PASSWORD }} - # - # - uses: docker/build-push-action@v2 - # with: - # context: . - # push: true - # cache-from: hexletcomponents/java-spring-blog:latest - # cache-to: type=inline - # tags: hexletcomponents/java-spring-blog:latest + deploy: + needs: build + runs-on: ubuntu-latest + if: ${{ github.event_name == 'push' }} + + steps: + - uses: actions/checkout@v4 + + - uses: docker/setup-buildx-action@v3 + + - uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - uses: docker/build-push-action@v5 + with: + context: . + push: true + cache-from: hexletcomponents/java-spring-blog:latest + cache-to: type=inline + tags: hexletcomponents/java-spring-blog:latest