diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 4dc8550..6924901 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -21,14 +21,12 @@ jobs: - name: Test Run id: test-run uses: ./ - with: - placeholder: "test_placeholder" - name: Assert placeholder uses: nick-fields/assert-action@v2 with: - actual: ${{ steps.test-run.outputs.placeholder }} - expected: "test_placeholder" + actual: ${{ steps.test-run.outcome }} + expected: "success" e2e: runs-on: ubuntu-latest if: always() && !cancelled() diff --git a/README.md b/README.md index 452d8dd..3a8ddb5 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![CI](https://github.com/datalens-tech/fix-dubious-ownership-action/workflows/Check%20PR/badge.svg)](https://github.com/datalens-tech/fix-dubious-ownership-action/actions?query=workflow%3A%22%22Check+PR%22%22) [![GitHub Marketplace](https://img.shields.io/badge/Marketplace-fix-dubious-ownership-action-blue.svg)](https://github.com/marketplace/actions/fix-dubious-ownership-action) -fix-dubious-ownership-action +Action to solve "detected dubious ownership" [error](https://github.com/actions/runner-images/issues/6775) ## Usage @@ -12,26 +12,20 @@ fix-dubious-ownership-action ```yaml jobs: fix-dubious-ownership-action: - permissions: - contents: read - steps: - name: fix-dubious-ownership-action - id: fix-dubious-ownership-action uses: datalens-tech/fix-dubious-ownership-action@v1 ``` ### Action Inputs -| Name | Description | Default | -| ------------- | ------------ | ------- | -| `placeholder` | Placeholder. | | +| Name | Description | Default | +| ------------------ | ----------------------- | ----------------------------------- | +| `github_repo_name` | GitHub Repository Name. | ${{ github.event.repository.name }} | ### Action Outputs -| Name | Description | -| ------------- | ------------ | -| `placeholder` | Placeholder. | +None ## Development diff --git a/action.yaml b/action.yaml index e59dfce..f72b1a8 100644 --- a/action.yaml +++ b/action.yaml @@ -2,24 +2,20 @@ name: "fix-dubious-ownership-action" description: "fix-dubious-ownership-action" inputs: - placeholder: - description: "Placeholder input to be replaced by real inputs" - required: true - default: "placeholder" - -outputs: - placeholder: - description: "Placeholder output to be replaced by real outputs" - value: ${{steps.placeholder.outputs.placeholder }} + github_repo_name: + description: "GitHub repository name" + default: ${{ github.event.repository.name }} runs: using: "composite" steps: - - name: Placeholder - id: placeholder + - name: Fix dubious ownership shell: bash run: | - echo "::set-output name=placeholder::${{ inputs.placeholder }}" + git config --global --add safe.directory . + git config --global --add safe.directory "/__w/${REPOSITORY_NAME}/${REPOSITORY_NAME}" + env: + REPOSITORY_NAME: ${{ inputs.github_repo_name }} # https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#branding branding: