-
Notifications
You must be signed in to change notification settings - Fork 11.5k
github action make checkout option persist-credentials explicit #56826
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
Conversation
ci seem to be currently failing on l12 branch instead of the change made here. Currently waiting to sync fork to confirm its not from my change |
CI/CD is passing now , i'll open back this PR . |
@@ -134,6 +134,7 @@ jobs: | |||
- name: Checkout code | |||
uses: actions/checkout@v4 |
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.
missing the changes?
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.
@crynobone I fixed it. I reverted and added it back normally.
When CI failed at first, I thought it might be from actions/upload-artifact, but it was actually the L12 branch
This reverts commit b0e8a2d.
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.
Since there’s an auto-commit step, I think setting persist-credentials: "false"
could break the workflow in .github/workflows/update-assets.yml
. So I’d prefer to skip this file.
This reverts commit e27d6bb.
I think it's fine to leave this as-is. |
Hello,
The goal of this PR is to make the use of the
persist-credentials
option in theactions/checkout
action explicit.By default,
actions/checkout
persists a credential in the checked-out repo’s.git/config
, allowing subsequent Git operations to be authenticated.However, this behavior can be problematic:
.git/config
publicly, e.g. by uploading it as part of an artifact viaactions/upload-artifact
..git/config
is not ideal unless explicitly required.Unless Git operations are needed in later steps,
actions/checkout
should be used with:Impact
This change only affects the CI/CD workflows and has no impact on end users.
Testing
To validate this change, the CI pipeline must pass across all impacted workflows.
If preferred, I can split this into multiple PRs for easier review and merging.
I can also begin applying this change to other Laravel repositories before proposing it directly to the framework.
Best,