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
Add set-safe-directory input to allow customer to take control. #770
Conversation
This fix should allow setting safe.directory manually and not having it overridden by the actions/checkout action. Test the behaviour works as expected for both the Cygwin runner (with a manually set safe.directory in the Git config file) and the Ubuntu runner (with no explicit safe.directory wrangling). Disable build steps that are unnecessary / slow / would produce permanent changes. Enable steps that we want to check with this action even though they'd normally only be run for actual releases (subject to the previous caveat).
I've just kicked off a build at https://github.com/me-and/Cygwin-Git/actions/runs/2194248694, where I was hitting #767; the fix looks good, but the test should properly confirm that the fix resolves the problem I was seeing. |
No, this doesn't work, at least as a fix for #767:
It looks like it's still copying the I don't think this change is a bad change, it just doesn't resolve my problem. I think resolving #767 needs to either entirely stop actions/checkout creating a temporary "global" |
|
||
test-git-container: | ||
runs-on: ubuntu-latest | ||
container: bitnami/git:latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we will have e2e coverage on any newer git version release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
มันน่าจะดีมากขึ้นไปอีก ผมเคารพการตัดสินใจของชุมชน
2839779
to
49508e7
Compare
git config --global --add safe.directory "*" | ||
git fetch --no-tags --depth=1 origin +refs/heads/main:refs/remotes/origin/main | ||
- name: Fix Checkout v3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we running this again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the second checkout will wipe the initial checkout and cause post-cleanup to fail...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe i can do clean:false
, let me try...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it doesn't work...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets add a quick comment if we can just to say # needed to make post run succeed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
จัดการได้ตามความเหมาะสม เห็นชอบ ของชุมชน
718cc50
to
49508e7
Compare
@me-and I updated the branch to make sure when |
Yes, that seems to work! The full run hasn't completed yet, but it has got through the checkout stage using Cygwin Git. Thank you! |
* Add set-safe-directory input to allow customers to take control.
… (#776) * Add set-safe-directory input to allow customers to take control.
This has been resolved in the [checkout](actions/checkout#770) action and would already be set by default.
In case of customers don't like the way we overwrite their global
gitconfig
withsafe.directory
.Ex: customers have properly configured
safe.directory
on their environment, andactions/checkout
overlay the wrong value.