How to use this in a composite action?
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- bash, github-actions, javascript
- Lĩnh vực
- ci-cd
Hướng nghiên cứu
No repository files or tests are named. Start with the linked composite-action documentation and the github-script v6 usage, then determine whether the shown JavaScript and Bash workflow is supported; done means documenting the supported approach or the limitation clearly.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I’m looking to create a composite action, and the task that I’m working on would be easiest to implement by doing some work in JavaScript and some other work in a Bash script. Can I use this action (github-script) to achieve this?
I added this to my action:
uses: "actions/github-script@v6"
with:
script: |
const script = require("./dist/index.js")
script({core})
But then I got this error when I ran it:
Error: Cannot find module '/home/runner/work/v2-core/v2-core/dist/index.js'
Require stack:
- /home/runner/work/_actions/actions/github-script/v6/dist/index.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.apply (/home/runner/work/_actions/actions/github-script/v6/dist/index.js:13400:27)
at eval (eval at callAsyncFunction (/home/runner/work/_actions/actions/github-script/v6/dist/index.js:13356:16), <anonymous>:3:16)
at callAsyncFunction (/home/runner/work/_actions/actions/github-script/v6/dist/index.js:13357:12)
at main (/home/runner/work/_actions/actions/github-script/v6/dist/index.js:13452:26)
at Module.858 (/home/runner/work/_actions/actions/github-script/v6/dist/index.js:13429:1)
at __webpack_require__ (/home/runner/work/_actions/actions/github-script/v6/dist/index.js:[24](https://github.com/sablierhq/v2-core/actions/runs/3861794209/jobs/6583130559#step:3:26):[31](https://github.com/sablierhq/v2-core/actions/runs/3861794209/jobs/6583130559#step:3:33)) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/home/runner/work/_actions/actions/github-script/v6/dist/index.js'
]
}
What am I doing wrong?
Side note - why not enable discussions in this repository?
- Ngôn ngữ chính
- TypeScript
- Star
- 5k
- Fork
- 586
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của actions/github-script
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
actions/github-script#728 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
actions/github-script#727 · 1 reaction ·
-
{ Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 10/100
actions/github-script#724 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
actions/github-script#723 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
actions/github-script#714 · 1 bình luận · 4 reaction ·
Tất cả issue của actions/github-script
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
bug v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
modelcontextprotocol/inspector#2458 · 1 bình luận ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
railmapgen/rmp-gallery#4068 ·
-
Mend: dependency security vulnerability status: needs triage 🕵️♀️
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
carbon-design-system/ibm-products#9907 ·