Skip to content

Commit

Permalink
perf(example-ts): add documents and action.yaml file
Browse files Browse the repository at this point in the history
  • Loading branch information
kamontat committed Mar 20, 2024
1 parent 807350e commit c8ed089
Show file tree
Hide file tree
Showing 6 changed files with 438 additions and 317 deletions.
Empty file added CONTRIBUTING.md
Empty file.
5 changes: 5 additions & 0 deletions actions/example-ts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Example actions

<!-- This should be developer documentation -->

The example GitHub Actions starter for this repository.
9 changes: 4 additions & 5 deletions actions/example-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,11 @@
"@actions/io": "1.1.3"
},
"devDependencies": {
"@kcws/eslint-config": "1.12.0",
"@kcws/heft-node-rig": "0.2.0",
"@kcws/prettier-config": "0.9.0",
"@kcws/eslint-config": "1.12.1",
"@kcws/heft-node-rig": "0.3.0",
"@kcws/prettier-config": "0.9.1",
"@rushstack/heft": "0.66.1",
"@types/heft-jest": "1.0.6",
"@types/node": "20.11.27",
"typescript": "5.0.4"
"@types/node": "20.11.30"
}
}
52 changes: 52 additions & 0 deletions actions/example-ts/src/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Example action
<!-- TODO: Update above title to <name> action -->

<!-- TODO: Update below description -->
The example action for doing nothing.

## Usage

<!-- TODO: Update below example configuration -->
```yaml
jobs:
job:
runs-on: ubuntu-latest
steps:
- uses: kc-workspace/github-actions/example-ts@v1
with:
# name: example
# dryrun: true
```

## Configurations

The configurations can be sent to the action in 2 ways:
[Environment variables][gh-actions-env] or [Input][gh-actions-input]
(The environment will always has priority over `with` fields).

[gh-actions-env]: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsenv
[gh-actions-input]: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepswith

### Name

`name` is a printing name (default is **example**).

| Input | Environment | Alternative Environment |
| ----- | ----------- | ----------------------- |
| name | NAME | EXAMPLE_TS\_\_NAME |

### Dryrun

`dryrun` will enabled dry-run mode instead of running actual command.

| Input | Environment | Alternative Environment |
| ------ | ----------- | ----------------------- |
| dryrun | DRYRUN | EXAMPLE_TS\_\_DRYRUN |

## Source code

<!-- TODO: Update below action name -->
> [github-actions-src#action/example-ts][source-code-url]
<!-- TODO: Update below action directory -->
[source-code-url]: https://github.com/kc-workspace/github-actions-src/tree/main/actions/example-ts
18 changes: 18 additions & 0 deletions actions/example-ts/src/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Typescript Example
description: Example actions written on Typescript
author: Kamontat Chantrachirathumrong

inputs:
name:
description: example name
dryrun:
description: dry-run the command instead executes
required: false

# outputs:
# output:
# description: Output description

runs:
using: node20
main: index.js
Loading

0 comments on commit c8ed089

Please sign in to comment.