Skip to content

Commit

Permalink
Merge pull request #167 from Vampire/add-typing
Browse files Browse the repository at this point in the history
Add action typing
  • Loading branch information
dmvict authored Aug 19, 2024
2 parents 6feedb7 + aeb34f4 commit 990f169
Show file tree
Hide file tree
Showing 6 changed files with 159 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/check-action-typing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Check Action Typing

on:
- push
- pull_request

jobs:
check_action_typing:
name: Check Action Typing
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Check Action Typing
uses: typesafegithub/github-actions-typing@v1
3 changes: 3 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ It is a cause of failed jobs. For this case, the action `wretry.action` can retr
- Retries actions with defined number of attempts ( default is 2 ).
- Retries actions with defined delay between attempts ( default is 0 ).

Thanks to the provided [typings](action-types.yml), it is possible to use this action in a type-safe way using
https://github.com/typesafegithub/github-workflows-kt which allows writing workflow files using a type-safe Kotlin DSL.

## Inputs

### `action`
Expand Down
35 changes: 35 additions & 0 deletions action-types.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# See https://github.com/typesafegithub/github-actions-typing/
inputs:
action:
type: string

command:
type: string

with:
type: string

current_path:
type: string

steps_context:
type: string

attempt_limit:
type: integer

attempt_delay:
type: integer

time_out:
type: integer

retry_condition:
type: string

github_token:
type: string

outputs:
outputs:
type: string
35 changes: 35 additions & 0 deletions main/action-types.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# See https://github.com/typesafegithub/github-actions-typing/
inputs:
action:
type: string

command:
type: string

with:
type: string

current_path:
type: string

steps_context:
type: string

attempt_limit:
type: integer

attempt_delay:
type: integer

time_out:
type: integer

retry_condition:
type: string

github_token:
type: string

outputs:
outputs:
type: string
35 changes: 35 additions & 0 deletions post/action-types.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# See https://github.com/typesafegithub/github-actions-typing/
inputs:
action:
type: string

command:
type: string

with:
type: string

current_path:
type: string

steps_context:
type: string

attempt_limit:
type: integer

attempt_delay:
type: integer

time_out:
type: integer

retry_condition:
type: string

github_token:
type: string

outputs:
outputs:
type: string
35 changes: 35 additions & 0 deletions pre/action-types.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# See https://github.com/typesafegithub/github-actions-typing/
inputs:
action:
type: string

command:
type: string

with:
type: string

current_path:
type: string

steps_context:
type: string

attempt_limit:
type: integer

attempt_delay:
type: integer

time_out:
type: integer

retry_condition:
type: string

github_token:
type: string

outputs:
outputs:
type: string

0 comments on commit 990f169

Please sign in to comment.