8000 Expose async-function argument type by viktorlott · Pull Request #402 · actions/github-script · GitHub
[go: up one dir, main page]

Skip to content

Expose async-function argument type #402

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Nov 8, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update alternative-setup.md
  • Loading branch information
viktorlott authored Jul 28, 2023
commit c857fcb22bcf36100e60a6b7a5d4b6750a99e941
10 changes: 5 additions & 5 deletions docs/alternative-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ root # Your repository
├── ...
├── actions
│ ├── action.yml (optional)
│ └── ci-test.js
│ └── ci-test.mjs
├── ...
└── package.json
```
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
result-encoding: string
script: |
const { default: script } = await import('${{ github.workspace }}/actions/ci-test.js');
const { default: script } = await import('${{ github.workspace }}/actions/ci-test.mjs');
return await script({ github, context, core, exec, glob, io, fetch, __original_require__ });
```

Expand All @@ -76,7 +76,7 @@ branding:
icon: code
inputs:
script:
description: The path to script (e.g actions/ci-test.js)
description: The path to script (e.g actions/ci-test.mjs)
required: true
github-token:
description: The GitHub token used to create an authenticated client
Expand Down Expand Up @@ -125,7 +125,7 @@ runs:


### The `ci-workflow.yml` file
Note that we only need to specify the script here because the path will be
Note that we only need to specify the script name here because the path will be
resolved to the `uses: ./actions` path by `process.env.GITHUB_ACTION_PATH`.
i.e the same folder as we are executing the action from.
```yml
Expand All @@ -149,6 +149,6 @@ jobs:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
result-encoding: string
script: ci-test.js
script: ci-test.mjs
```

0