Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"You are currently not on a branch" fatal commit #14

Open
DaanWet opened this issue Nov 16, 2020 · 2 comments
Open

"You are currently not on a branch" fatal commit #14

DaanWet opened this issue Nov 16, 2020 · 2 comments

Comments

@DaanWet
Copy link

DaanWet commented Nov 16, 2020

So I'm using this workflow setup, the build works perfectly fine, but the commit step fails because I'm currently not on a branch

grunt-build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
    - name: Compile with Grunt
      uses: elstudio/actions-js-build/build@v2
      with:
        args: 'build'

    - name: Commit changes
      uses: elstudio/actions-js-build/commit@v3
      with:
        commitMessage: Build Latest Version

This is the error I'm getting

Run elstudio/actions-js-build/commit@v3
  with:
    commitMessage: Build Latest Version
    pushBranch: master
    debug: false
/usr/bin/docker run --name bb105e3e0f5633074cb79ea55b1461123c70_d89e67 --label 54bb10 --workdir /github/workspace --rm -e INPUT_COMMITMESSAGE -e INPUT_PUSHBRANCH -e INPUT_WDPATH -e INPUT_DEBUG -e DEBUG -e WD_PATH -e COMMIT_MESSAGE -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/gamesense-client/gamesense-client":"/github/workspace" 54bb10:5e3e0f5633074cb79ea55b1461123c70
Checking for uncommitted changes in the git working tree.
1
[detached HEAD bdcbbea] Build Latest Version
 3 files changed, 174 insertions(+), 31 deletions(-)
 rewrite dist/gamesense-client.min.js (98%)
fatal: You are not currently on a branch.
To push the history leading to the current (detached HEAD)
state now, use

    git push origin HEAD:<name-of-remote-branch>

Is there a way to fix this?

@elstudio
Copy link
Owner

Sorry for that @DaanWet

Mind giving this a try with the new @v4 versions of these actions?

I believe that should avoid this issue — but I’d love confirmation.

@maslick
Copy link

maslick commented May 23, 2021

Tried v4 and it worked 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants