Skip to content

Commit

Permalink
fix: Add repository not found trouble shooting to README (#271)
Browse files Browse the repository at this point in the history
  • Loading branch information
andreiborza authored Feb 28, 2025
1 parent c5268dc commit 675de63
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 5 deletions.
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

0 comments on commit 675de63

Please sign in to comment.