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

skip unshallow if the repo is already unshallowed #28

Conversation

shogo82148
Copy link
Collaborator

I want to run some scripts before tagging.
e.g. https://github.com/reviewdog/action-actionlint/blob/d3a6e1d60834d9308636d291e53651ba1c2479d7/.github/workflows/release.yml#L30-L37

But I can't make any change in my script because of a permission error.

https://github.com/reviewdog/action-actionlint/runs/3135103508?check_suite_focus=true#step:5:193

+ git checkout main -- action.yml
+ perl -i -pe 's(image:\s*["'\'']?Dockerfile["'\'']?)(image: '\''docker://ghcr.io/reviewdog/action-actionlint:v1.5.0'\'')' action.yml
+ git add action.yml
+ git commit -m 'bump v1.5.0'
error: insufficient permission for adding an object to repository database .git/objects
error: insufficient permission for adding an object to repository database .git/objects
error: Error building trees
Error: Process completed with exit code 1.

It looks that files created in the docker environment doesn't have enough permission.
This patch stop creating new files by skipping git fetch if the repository is already unshallowed.

Copy link
Owner

@haya14busa haya14busa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@haya14busa haya14busa merged commit 8aa0bae into haya14busa:master Nov 9, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Nov 9, 2021

🚀 [bumpr] Bumped! New version:v1.7.0 Changes:v1.6.1...v1.7.0

@shogo82148 shogo82148 deleted the skip-unshallow-if-already-unshallowed branch November 9, 2021 15:02
shogo82148 added a commit to reviewdog/action-actionlint that referenced this pull request Nov 24, 2022
we use a forked one.
however haya14busa/action-bumpr#28 has been merged, so the fork is no longer needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants