Skip to content

Commit

Permalink
feat: move action from datalens repos (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
flukolo4ek authored Oct 25, 2024
1 parent 25f7999 commit 472fb7b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 27 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,13 @@ jobs:
- name: Test Run
id: test-run
uses: ./
with:
placeholder: "test_placeholder"
continue-on-error: true

- 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()
Expand Down
16 changes: 5 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down
20 changes: 8 additions & 12 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 472fb7b

Please sign in to comment.