Skip to content

nothing to commit, working tree clean Error: Invalid status code: 1 #204

@dmason30

Description

@dmason30

Version of the Action
v4.x.x

Describe the bug
We seem to be getting this error on every run when there are no change. It only started erroring recently. The file it says is modified is a built javascript file but is probably only whitespace changes hence nothing to commit, we have been using this action for over a year without issue until this point.

Unfortunately this is in a private repo so I am unable to link you and have redacted the repository info below but everything else is verbatim.

Run stefanzweifel/git-auto-commit-action@v4
Started: bash /home/runner/work/_actions/stefanzweifel/git-auto-commit-action/v4/entrypoint.sh
INPUT_REPOSITORY value: .
INPUT_STATUS_OPTIONS: 
INPUT_BRANCH value: 
From https://github.com/xxx/xxx
 * [new branch]      3.23.0         -> origin/3.23.0
 * [new branch]      TA-1911-Cordova-->-Code-Push-->-Ionic/Applow -> origin/TA-1911-Cordova-->-Code-Push-->-Ionic/Applow
 * [new branch]      master         -> origin/master
 * [new tag]         3.22.0         -> 3.22.0
 * [new tag]         3.23.0-beta.0  -> 3.23.0-beta.0
 * [new tag]         3.23.0.alpha.9 -> 3.23.0.alpha.9
M	site/public/vendor/nova-tools/app.js
Your branch is up to date with 'origin/develop'.
INPUT_ADD_OPTIONS: 
INPUT_FILE_PATTERN: .
warning: CRLF will be replaced by LF in site/public/vendor/nova-tools/app.js.
The file will have its original line endings in your working directory
INPUT_COMMIT_OPTIONS: 
INPUT_COMMIT_USER_NAME: GitHub Actions
INPUT_COMMIT_USER_EMAIL: [email protected]
INPUT_COMMIT_MESSAGE: Publish laravel package assets
INPUT_COMMIT_AUTHOR: dmason30 <[email protected]>
On branch develop
Your branch is up to date with 'origin/develop'.

nothing to commit, working tree clean
Error: Invalid status code: 1
    at ChildProcess.<anonymous> (/home/runner/work/_actions/stefanzweifel/git-auto-commit-action/v4/index.js:[17](https://github.com/TMCApplications/TMC-BACKEND/runs/5316717959?check_suite_focus=true#step:10:17):[19](https://github.com/TMCApplications/TMC-BACKEND/runs/5316717959?check_suite_focus=true#step:10:19))
    at ChildProcess.emit (events.js:[21](https://github.com/xxx/xxx/runs/5316717959?check_suite_focus=true#step:10:21)0:5)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:[28](https://github.com/xxx/xxx/runs/5316717959?check_suite_focus=true#step:10:28)3:5) {
  code: 1
}
Error: Invalid status code: 1
    at ChildProcess.<anonymous> (/home/runner/work/_actions/stefanzweifel/git-auto-commit-action/v4/index.js:17:19)
    at ChildProcess.emit (events.js:210:5)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)

Used Workflow

name: "Publish assets"

on:
  push:
    branches:
      - develop

jobs:
  publish:

    runs-on: ubuntu-latest

    env:
      TELESCOPE_ENABLED: true

    name: Publish assets

    defaults:
      run:
        working-directory: site

    services:
      mysql:
        image: mysql:8.0
        env:
          MYSQL_ALLOW_EMPTY_PASSWORD: yes
          MYSQL_DATABASE: tmc_test
        ports:
          - 3306
        options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

    steps:
      - name: Checkout code
        uses: actions/checkout@v2
        with:
          ref: ${{ github.head_ref }}

      - name: Cache composer dependencies
        uses: actions/cache@v2
        with:
          path: ~/.composer/cache/files
          key: dependencies-php-8.0-composer-${{ hashFiles('**/composer.lock') }}
          restore-keys: |
            dependencies-php-8.0-composer-

      - name: Setup PHP 8.0
        uses: shivammathur/setup-php@v2
        with:
          php-version: 8.0
          extensions: ctype, curl, date, dom, fileinfo, filter, gd, hash, iconv, intl, json, libxml, mbstring, openssl, pcntl, pcre, pdo, pdo_sqlite, pdo_mysql, phar, posix, simplexml, spl, sqlite, tokenizer, tidy, xml, xmlreader, xmlwriter, zip, zlib
          coverage: none

      - name: Reset MySQL root user authentication method
        run: mysql --host 127.0.0.1 --port ${{ job.services.mysql.ports[3306] }} -uroot -e "alter user 'root'@'%' identified with mysql_native_password by ''"

      - name: Prepare Laravel Application
        run: cp .env.testing .env

      - name: Install PHP dependencies (composer)
        run: |
          composer config "http-basic.nova.laravel.com" "${{ secrets.NOVA_USERNAME }}" "${{ secrets.NOVA_PASSWORD }}"
          composer install --no-interaction

      - name: Run migration and publish
        run: |
          php artisan migrate --force
          composer publish
        env:
          DB_HOST: 127.0.0.1
          DB_PORT: ${{ job.services.mysql.ports[3306] }}

      - uses: stefanzweifel/git-auto-commit-action@v4
        with:
          commit_message: Publish laravel package assets

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions