File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 66on :
77 # Triggers the workflow on push or pull request events but only for the "main" branch
88 push :
9- branches : [ "main" ]
9+ branches : ["main"]
1010 pull_request :
11- branches : [ "main" ]
11+ branches : ["main"]
1212
1313 # Allows you to run this workflow manually from the Actions tab
1414 workflow_dispatch :
2424 steps :
2525 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
2626 - uses : actions/checkout@v4
27+ with :
28+ script : |
29+ const { execSync } = require('child_process')
30+ const { commits } = context.payload.pull_request
31+ const rawFiles = execSync(`git diff --name-only HEAD HEAD~${commits}`).toString()
32+ const files = rawFiles.split('\n').filter(Boolean)
33+
34+ console.log(files)
2735
2836 # Runs a set of commands using the runners shell
2937 - name : Run a multi-line script
You can’t perform that action at this time.
0 commit comments