Skip to content

Changes are not committed #67

@javierggt

Description

@javierggt

In version 4, the local changes were committed, but in v5 it is not committed and it tries to pull with the dirty local directory. The changes from the previous configuration were the version and I specified branch instead of ref. Any idea what could be my issue?

This is the workflow:

---
name: Test
on: push
jobs:
  build-linux:
    runs-on: runner
    name: Test
    steps:
      - name: Fetch
        uses: actions/checkout@v2
        with:
          path: netrc
          ref: netrc
      - name: modify
        run: echo test >> netrc/tokens
      - name: Commit changes
        uses: EndBug/add-and-commit@v5
        with:
          branch: "netrc"
          cwd: "netrc"
          author_name: <my name>
          author_email: <my email>
          message: "Save"
          add: "tokens"
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

and here is the internal log:

  > Staging files...
  > Adding files...
  > No files to remove.
  > Checking for uncommitted changes in the git working tree...
  > Found 1 changed files.
  FetchSummary {
    raw: 'From https://github.com/sot/test-actions\n' +
      '   16d867b..daa2b2b  master     -> origin/master\n',
    remote: 'https://github.com/sot/test-actions',
    branches: [],
    tags: []
  }
  > Switching/creating branch...
  M	tokens
  Your branch is up to date with 'origin/netrc'.
  
  > Pulling from remote...
  FetchSummary { raw: '', remote: null, branches: [], tags: [] }
  Error: Error: error: cannot pull with rebase: Your index contains uncommitted changes.
  error: please commit or stash them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: pendingMore info is needed before deciding what to dostatus: staleInactive issues and PRs

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions