Closed darko1002001 closed 2 years ago
+1 on this, my theory is the addition of the optional arguments here is interfering with the git config
inside the container, where the user.email
and user.name
that the action uses to deploy to your dokku instance is set, though I haven't found those lines in the codebase(s) yet.
Quick fix would be to revert to version 1.0.2
in your workflow file, replacing dokku/github-action@master
with dokku/github-action@1.0.2
.
That theory is unfortunately wrong. It has to do with the newer git version that is used in the newer base image. I can set that property in the image before we do a git push but I'm afk so that will need to wait till later today.
This error is due to a git command security improvement change: https://github.com/git/git/commit/8959555cee7ec045958f9b6dd62e541affb7e7d9
Also reported here https://github.com/actions/runner/issues/2033
The most obvious solution is add git config --global --add safe.directory /github/workspace
The most obvious solution is add
git config --global --add safe.directory /github/workspace
Add it where? If I add it as a step in the job between checkout and push...
deploy_staging:
concurrency:
group: staging_deploy
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/staging'
needs: [test]
steps:
- name: Clone
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Mark github workspace as safe
run: |
git config --global --add safe.directory /github/workspace
- name: Push to dokku staging
uses: dokku/github-action@master
with:
git_push_flags: '--force'
git_remote_url: 'ssh://dokku@my-server'
ssh_private_key: ${{ secrets.DOKKU_PRIVATE_KEY }}
Then it still fails. Likewise if I try the suggestion from actions/runner#2033 of chown -R $(id -u):$(id -g) $PWD
Sorry @asilano , but these changes should be done by @josegonzalez in the bin/*
files of https://github.com/dokku/ci-docker-docker image repository. He said that will do later today. š
Ah, thought that might be the case.
Is there a known workaround?
If someone wants to try version ed6c57e19913c8f663e0b240fe3b3cfc1c8c5781
(instead of v1.1.0
) to verify the fix, that would be great.
The newer version is out. If someone wants to try v1.1.2, let me know if it is fixed (should be).
Seems to do the job - thanks for the speedy fix!
@josegonzalez yes, it works as expected! Thanks! šš» šš»
Can confirm it works for me - thank you for the quick fix.
Thanks for the quick fix :D
Description of problem
I am getting this error when using the 1.1.1 version of the action
Command that gets executed which fails
Environment configuration
This is the deploy task i am using.
deploy: runs-on: ubuntu-latest steps:
I am using: dokku version 0.27.6