heroku-deploy icon indicating copy to clipboard operation
heroku-deploy copied to clipboard

GitHub action not working

Open onlinejudge95 opened this issue 3 years ago • 4 comments

The deployment fails via GitHub action with the following traceback

Run akhileshns/[email protected]
  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.

onlinejudge95 avatar May 14 '21 16:05 onlinejudge95

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

nekromant322 avatar May 15 '21 21:05 nekromant322

@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/[email protected]"
        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

onlinejudge95 avatar May 16 '21 10:05 onlinejudge95

@AkhileshNS any update on this?

veritem avatar Jun 12 '21 17:06 veritem

Run akhileshns/[email protected] 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

SoloLeveling7seven avatar Jul 24 '22 10:07 SoloLeveling7seven