AkhileshNS / heroku-deploy

A simple github action that dynamically deploys an app to heroku
MIT License
981 stars 258 forks source link

GitHub action not working #92

Open onlinejudge95 opened 3 years ago

onlinejudge95 commented 3 years ago

The deployment fails via GitHub action with the following traceback

Run akhileshns/heroku-deploy@v3.12.12
  with:
    docker_heroku_process_type: web
    heroku_api_key: ***
    heroku_app_name: email-service-web
    heroku_email: ***
    usedocker: true
    branch: HEAD
    dontuseforce: false
    dontautocreate: false
    delay: 0
    rollbackonhealthcheckfailed: false
    justlogin: false
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
Successfully logged into heroku
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Added git remote heroku
The command '/bin/sh -c apt-get update     && apt-get install build-essential=12.6 libpq-dev=11.11-0+deb10u1 --no-install-recommends --quiet --yes     && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100
 ▸    Error: docker build exited with Error: 100

            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 email-service-web 
The command '/bin/sh -c apt-get update     && apt-get install build-essential=12.6 libpq-dev=11.11-0+deb10u1 --no-install-recommends --quiet --yes     && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100
 ▸    Error: docker build exited with Error: 100

The command '/bin/sh -c apt-get update     && apt-get install build-essential=12.6 libpq-dev=11.11-0+deb10u1 --no-install-recommends --quiet --yes     && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100
Error: Error: Command failed: heroku container:push web --app email-service-web 
The command '/bin/sh -c apt-get update     && apt-get install build-essential=12.6 libpq-dev=11.11-0+deb10u1 --no-install-recommends --quiet --yes     && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100
 ▸    Error: docker build exited with Error: 100

 ▸    Error: docker build exited with Error: 100

Whereas the deployment via heroku container:push web --app email-service-web && heroku container:release web --app email-service-web works as expected. Note that the error form actions persist even if I create a new app with no previous deployments. Also the secrets are set correctly.

nekromant322 commented 3 years ago

Got the same error I don't know what to do with this

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 zoohotel1

onlinejudge95 commented 3 years ago

@nekromant322 meanwhile as a workaround i am using the following comment as inspiration https://github.com/AkhileshNS/heroku-deploy/issues/35#issuecomment-718067543

Here is my new action file

name: "CD"

on:
  push:
    branches: ["release"]

jobs:
  deploy:
    runs-on: "ubuntu-latest"
    steps:
      - uses: actions/checkout@v2

      - name: "Deploy the web dyno"
        uses: "akhileshns/heroku-deploy@v3.12.12"
        with:
          docker_heroku_process_type: web
          heroku_api_key: ${{ secrets.HEROKU_API_KEY }}
          heroku_app_name: email-service-web
          heroku_email: ${{ secrets.HEROKU_EMAIL }}
          justlogin: true

      - name: "Login to heroku registry"
        run: heroku container:login

      - name: "Build and push to heroku registry"
        run: heroku container:push web --app email-service-web

      - name: "Releases the container"
        run: heroku container:release web --app email-service-web

That being said it is just a workaround and I would expect the developer to solve this issue or at least be responsive

veritem commented 3 years ago

@AkhileshNS any update on this?

SoloLeveling7seven commented 2 years ago

Run akhileshns/heroku-deploy@v3.12.12 Created and wrote to ~/.netrc › Warning: Our terms of service have changed: Successfully logged into heroku › 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 Added git remote heroku Setting CONFIG_FILE_URL and restarting ... done, v5 received unexpected HTTP status: 500 Internal Server Error ▸ Error: docker push 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 received unexpected HTTP status: 500 Internal Server Error ▸ Error: docker push exited with Error: 1 received unexpected HTTP status: 500 Internal Server Error ▸ Error: docker push exited with Error: 1 Error: Error: Command failed: heroku container:push web --app *** received unexpected HTTP status: 500 Internal Server Error ▸ Error: docker push exited with Error: 1