diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 311f6f6..b6d4368 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -11,27 +11,20 @@ jobs: steps: - name: Check out the repo uses: actions/checkout@v4 - - - name: Log in to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@v5 - with: - images: nirlipo/planimation_backend - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Build and push Docker image - uses: docker/build-push-action@v6 - with: - context: server - file: docker/release/Dockerfile - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} + + - name: login to docker hub + id: docker-hub + env: + username: ${{secrets.DOCKERHUB_USERNAME}} + password: ${{secrets.DOCKERHUB_PASSWORD}} + run: | + docker login -u $username -p $password + + - name: build the docker image + id: build-docker-image + run: | + ls -la + docker build . -f server/docker/release/Dockerfile -t nirlipo/planimation_backend:latest + - name: push the docker image + id: push-docker-image + run: docker push ${{secrets.DOCKERHUB_USERNAME}}/planimation_backend:latest