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 24, 2024
1 parent ef2f469 commit 2320ecc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 32 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,24 @@ jobs:
e2e-default:
runs-on: ubuntu-latest

permissions:
contents: read

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Test Run
id: test-run
uses: ./
with:
placeholder: "test_placeholder"

- name: Check repo after action
id: post-action
run: echo "result="$(ls -a)"" >> $GITHUB_OUTPUT

- name: Assert placeholder
uses: nick-fields/assert-action@v2
with:
actual: ${{ steps.test-run.outputs.placeholder }}
expected: "test_placeholder"
actual: ${{ steps.post-action.outputs.result }}
expected: ". .."

e2e:
runs-on: ubuntu-latest
if: always() && !cancelled()
Expand Down
14 changes: 3 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/cleanup-folder-action/workflows/Check%20PR/badge.svg)](https://github.com/datalens-tech/cleanup-folder-action/actions?query=workflow%3A%22%22Check+PR%22%22)
[![GitHub Marketplace](https://img.shields.io/badge/Marketplace-cleanup-folder-action-blue.svg)](https://github.com/marketplace/actions/cleanup-folder-action)

cleanup-folder-action
Action for delete data from action`s workdir

## Usage

Expand All @@ -12,26 +12,18 @@ cleanup-folder-action
```yaml
jobs:
cleanup-folder-action:
permissions:
contents: read

steps:
- name: cleanup-folder-action
id: cleanup-folder-action
uses: datalens-tech/cleanup-folder-action@v1
```
### Action Inputs
| Name | Description | Default |
| ------------- | ------------ | ------- |
| `placeholder` | Placeholder. | |
None
### Action Outputs
| Name | Description |
| ------------- | ------------ |
| `placeholder` | Placeholder. |
None
## Development
Expand Down
17 changes: 3 additions & 14 deletions action.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,14 @@
name: "cleanup-folder-action"
description: "cleanup-folder-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 }}

runs:
using: "composite"
steps:
- name: Placeholder
id: placeholder
- name: Cleanup build folder
shell: bash
run: |
echo "::set-output name=placeholder::${{ inputs.placeholder }}"
rm -rf ./* || true
rm -rf ./.??* || true
# https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#branding
branding:
Expand Down

0 comments on commit 2320ecc

Please sign in to comment.