Skip to content

Commit

Permalink
feat: add action
Browse files Browse the repository at this point in the history
  • Loading branch information
filipstefansson committed Dec 2, 2019
0 parents commit d602cbf
Show file tree
Hide file tree
Showing 7 changed files with 769 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.DS_Store

# dependency files and directories
node_modules/
.npm

# dotenv environment variables file
.env
.env.test

# editor
.vscode
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# UUID GitHub Action

GitHub Action to create generate [UUIDs](https://en.wikipedia.org/wiki/Universally_unique_identifier).

Use the `name` argument to be able to generate the same UUID over and over using the same input. If you don't pass `name`, a random UUID will be returned.

## Inputs

### `name`

(optional) Use this to be able to generate a UUID based on input.

### `namespace`

(optional) Set the UUID namespace.

## Outputs

### `uuid`

The generated UUID.

## Example usage

```yaml
jobs:
test:
runs-on: ubuntu-latest
name: Test UUID action
steps:
- name: Set UUID
id: generate-uuid
uses: filipstefansson/uuid-action@v1
with:
name: ${{ gihub.sha }}
# use the output from the `generate-uuid` step
- name: Get the UUID
run: echo "UUID is ${{ steps.generate-uuid.outputs.uuid }}"
```
15 changes: 15 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: 'UUID Action'
description: 'Generate UUIDs.'
inputs:
name:
description: 'create a UUID using a name.'
required: false
namespace:
description: 'create a UUID using a namespace.'
required: false
outputs:
uuid:
description: 'the generated UUID.'
runs:
using: 'node12'
main: 'dist/index.js'
Loading

0 comments on commit d602cbf

Please sign in to comment.