Estoy intentando deployar en Heroku usando el repositorio de Github.
Y me está dando el siguiente error en el action:
Run akhileshns/[email protected] Created and wrote to ~/.netrc › Warning: Our terms of service have changed: › https://dashboard.heroku.com/terms-of-service WARNING! Your password will be stored unencrypted in /home/runner/.docker/config.json. Configure a credential helper to remove this warning. See https://docs.docker.com/engine/reference/commandline/login/#credentials-store
Successfully logged into heroku Added git remote heroku The command '/bin/sh -c dotnet restore "ApiTalleres.csproj"' returned a non-zero code: 1 ▸ Error: docker build exited with Error: 1
Unable to push branch because the branch is behind the deployed branch. Using --force to deploy branch.
(If you want to avoid this, set dontuseforce to 1 in with: of .github/workflows/action.yml.
Specifically, the error was: Error: Command failed: heroku container:push web --app app-talleres-pro
The command '/bin/sh -c dotnet restore "ApiTalleres.csproj"' returned a non-zero code: 1 ▸ Error: docker build exited with Error: 1
The command '/bin/sh -c dotnet restore "ApiTalleres.csproj"' returned a non-zero code: 1 ▸ Error: docker build exited with Error: 1 Error: Error: Command failed: heroku container:push web --app app-talleres-pro The command '/bin/sh -c dotnet restore "ApiTalleres.csproj"' returned a non-zero code: 1 ▸ Error: docker build exited with Error: 1
Mi archivo de dockerfile, en el proyecto es: FROM mcr.microsoft.com/dotnet/aspnet:3.1 AS base WORKDIR /app EXPOSE 80 EXPOSE 443
FROM mcr.microsoft.com/dotnet/sdk:3.1 AS build WORKDIR /src COPY ["ApiTalleres.csproj", "ApiTalleres/"] #RUN dotnet restore "ApiTalleres.csproj" COPY . . WORKDIR "/src/ApiTalleres" RUN dotnet build "ApiTalleres.csproj" -c Release -o /app/build
FROM build AS publish RUN dotnet publish "ApiTalleres.csproj" -c Release -o /app/publish
FROM base AS final WORKDIR /app COPY --from=publish /app/publish . CMD ASPNETCORE_URLS=http://*:$PORT dotnet ApiTalleres.dll
Si falta más info la agrego!
Gracias!