getsentry / action-release

GitHub Action for creating a release on Sentry
Apache License 2.0
446 stars 53 forks source link

error: could not find repository from '.'; class=Repository (6); code=NotFound (-3) #55

Open patrickbussmann opened 3 years ago

patrickbussmann commented 3 years ago

Environment

How do you use Sentry? Sentry SaaS (sentry.io)

Which SDK and version? TypeScript 4

Steps to Reproduce

name: Sentry release

on:
  push:
    branches:
      - master

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Setup Node.js
        uses: actions/setup-node@v2
        with:
          node-version: '14'
      - name: Install dependencies
        run: npm install
      - name: Get the version
        id: get_version
        run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
      - name: Create Sentry release
        uses: getsentry/action-release@v1
        env:
          SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
          SENTRY_ORG: exampleorg
          SENTRY_PROJECT: myproject
        with:
          environment: production
          version: ${{ steps.get_version.outputs.VERSION }}

Expected Result

Release is created on sentry.

This snippet is working fine.

      - name: Create Sentry release
        run: |
          sentry-cli info 2>&1 || curl -sL https://sentry.io/get-cli/ | bash
          sentry-cli releases new "$VERSION"
          sentry-cli releases files "$VERSION" upload-sourcemaps dist
          rm dist/*.map
          sentry-cli releases finalize "$VERSION"
        env:
          SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
          SENTRY_ORG: exampleorg
          SENTRY_PROJECT: myproject
          VERSION: ${{ steps.get_version.outputs.VERSION }}

Actual Result

Run getsentry/action-release@v1
/usr/bin/docker run --name sentryintegrationssentrygithubactionreleaselatest_e4dc8a --label c3f261 --workdir /github/workspace --rm -e SENTRY_AUTH_TOKEN -e SENTRY_ORG -e SENTRY_PROJECT -e INPUT_ENVIRONMENT -e INPUT_VERSION -e INPUT_SOURCEMAPS -e INPUT_FINALIZE -e INPUT_STARTED_AT -e INPUT_VERSION_PREFIX -e INPUT_SET_COMMITS -e INPUT_PROJECTS -e INPUT_URL_PREFIX -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/tmp/github-runner/_temp/_github_home":"/github/home" -v "/tmp/github-runner/_temp/_github_workflow":"/github/workflow" -v "/tmp/github-runner/_temp/_runner_file_commands":"/github/file_commands" -v "/tmp/github-runner/example.org/example.org":"/github/workspace" sentryintegrations/sentry-github-action-release:latest
Error: Command failed: /action-release/dist/sentry-cli releases set-commits master --auto
error: could not find repository from '.'; class=Repository (6); code=NotFound (-3)

Add --log-level=[info|debug] or export SENTRY_LOG_LEVEL=[info|debug] to see more output.
Please attach the full debug log to all bug reports.
facundofarias commented 1 year ago

Same issue, any news?

mfernandezbon commented 10 months ago

Could you solve it? I have the same issue. My workflow file is it:


jobs:
  deploy-app:
    name: deploy app to production
    runs-on: ubuntu-latest
    container:
      image: ${{ vars.RUN_IMAGE_NAME }}
      credentials:
        username: ${{ github.actor }}
        password: ${{ secrets.github_token }}
    environment:
      name: production
      url: https://<my_url>
    env:
      RELEASE_VERSION: ${{ vars.RELEASE_VERSION }}
      SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
      SENTRY_AUTH_TOKEN: XXXXXXXXXXX
      SENTRY_PROJECT: <my_project_name>
    steps: 
      - name: Git clone the repository
        uses: actions/checkout@v3
        with:
          fetch-depth: 0
      - name: Create Sentry release
        uses: getsentry/action-release@v1
        with:
          finalize: false 
          version: ${{ vars.RELEASE_VERSION }}
      - name: configure aws credentials with OpenID Provider
        uses: aws-actions/configure-aws-credentials@v3
        with:
          role-to-assume: ${{ vars.OID_AWS_ARN_ROLE }} 
          role-session-name: ServerlessDeploymentSession
          aws-region: ${{ vars.AWS_REGION }}
      - name: deploy serverless
        run: |
          . cicd/deploy-app.sh