Skip to content

fix: Add repository not found trouble shooting to README #271

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

Merged
merged 1 commit into from
Feb 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 24 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Adding the following to your workflow will create a new Sentry release and tell

> [!IMPORTANT]
> Make sure you are using at least v3 of [actions/checkout](https://github.com/actions/checkout) with `fetch-depth: 0`, issues commonly occur with older versions.

```yaml
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -149,16 +149,36 @@ Otherwise it could fail at the `propose-version` step with the message:
error: Could not automatically determine release name
```

- In `actions/checkout@v3` the default fetch depth is 1. If you're getting the error message:
- In `actions/checkout@v4` the default fetch depth is 1. If you're getting the error message:

```text
error: Could not find the SHA of the previous release in the git history. Increase your git clone depth.
```

you can fetch all history for all branches and tags by setting the `fetch-depth` to zero like so:

```text
- uses: actions/checkout@v3
```yaml
- uses: actions/checkout@v4
with:
fetch-depth: 0
```

- Not finding the repository

```text
Error: Command failed: /action-release/node_modules/@sentry/cli-linux-x64/bin/sentry-cli --header sentry-trace:ab7a03b5cd8ce324103b3ced985de08b-2bf7fecfb8a1e812-1 --header baggage:sentry-environment=production-sentry-github-action,sentry-release=1.10.5,sentry-public_key=<truncated>,sentry-trace_id=ab7a03b5cd8ce324103b3ced985de08b,sentry-sample_rate=1,sentry-transaction=sentry-github-action-execution,sentry-sampled=true releases set-commits action-test --auto
error: could not find repository at '.'; class=Repository (6); code=NotFound (-3)
```

Ensure you use `actions/checkout` before running the action

```yaml
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: getsentry/action-release@v1
with:
environment: 'production'
version: 'v1.0.1'
```
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ runs:
INPUT_WORKING_DIRECTORY: ${{ inputs.working_directory }}
INPUT_DISABLE_TELEMETRY: ${{ inputs.disable_telemetry }}
INPUT_DISABLE_SAFE_DIRECTORY: ${{ inputs.disable_safe_directory }}
uses: docker://ghcr.io/getsentry/action-release-image:master
uses: docker://ghcr.io/getsentry/action-release-image:ab-add-troublehsooting

# For actions running on macos or windows runners, we use a composite
# action approach which allows us to install the arch specific sentry-cli
Expand Down