How to use this in a composite action?
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 25/100
- Type d'issue
- Documentation
- Clarté
- À clarifier
- Activité
- À l'abandon
- Stack technique
- bash, github-actions, javascript
- Domaine
- ci-cd
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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?
- Langage dominant
- TypeScript
- Étoiles
- 5k
- Forks
- 586
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de actions/github-script
-
Difficulté 3/5 1-2 jours Accessibilité débutants 48/100
actions/github-script#728 ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 52/100
actions/github-script#727 · 1 réaction ·
-
{ Ouverte
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 10/100
actions/github-script#724 ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 55/100
actions/github-script#723 · 1 commentaire ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 55/100
actions/github-script#714 · 1 commentaire · 4 réactions ·
Toutes les issues de actions/github-script
Issues similaires
-
blocklist removal
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
MetaMask/eth-phishing-detect#296544 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
pastelsky/bundlephobia#1122 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
-
category/development priority/P2 scope/file-operations scope/testing type/enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
-
Enatega Customer and Rider app: Add-ons price is not visible to customer after order is placed. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100