AkhileshNS / heroku-deploy

A simple github action that dynamically deploys an app to heroku

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error: Error: Command failed: git add -A && git commit -m "Commited changes from previous actions"

kimmy-wang opened this issue · comments

name: Deploy To Heroku

on:
  push:
    branches: [ main ]

jobs:
  deploy-to-heroku:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          token: ${{ secrets.GH_TOKEN }}
          submodules: true

      - name: Deploy To Heroku
        uses: akhileshns/heroku-deploy@v3.12.12 # This is the action
        with:
          heroku_api_key: ${{secrets.HEROKU_API_KEY}}
          heroku_app_name: ${{secrets.HEROKU_APP_NAME_TS}} #Must be unique in Heroku
          heroku_email: ${{secrets.HEROKU_EMAIL}}
          procfile: ${{secrets.HEROKU_PROCFILE}}
          env_file: '.env'

Ran into the same issue. Seems to be that if some actions ran in the same job change file contents, the action tries to commit those https://github.com/AkhileshNS/heroku-deploy/blob/master/index.js#L190-L193

I can't see why the action should commit anything. For me the issue was commitlint rules not allowing this syntax and out of sync yarn lockfile, which was updated when installing dependencies.

commented

Edited: I just confirmed this, this is due to submodules especially when your submodule is not at the latest commit.