I'm writting a shared github workflow meant to be reused (ex: my-username/my-repo/.github/workflows/my-workflow.yml).
And in another repository:
jobs:
my-job:
uses: my-username/my-repo/.github/workflows/my-workflow
I'd like this workflow file to run a node script
Ex:
my-script.js:
const myModule = require('my-module');
myPackage.doSomething();
How do I share my-script.js and make it available in the workflow?
My current workflow file is:
# my-username/my-repo/.github/workflows/my-workflow.yml
on:
workflow_call:
jobs:
my-job:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- uses: actions/setup-node@v4
- run: npm install my-module
# - run: node ??/my-script.js