diff --git a/action.cjs b/action.cjs index 6f71fb55..4ba5ef17 100644 --- a/action.cjs +++ b/action.cjs @@ -5,6 +5,11 @@ function hashFiles (filename) { } module.exports = async ({ github, context, inputs, steps, actionPath, core }) => { + // Write changed files to file + if (steps['reviewdog-enabled-pr'].outputs.result === 'true') { + const fs = require('fs') + fs.writeFileSync(`${actionPath}/assets/all_changed_files.txt`, steps['changed-files'].outputs.all_changed_files) + } // comments-before steps let commentsBefore = null if (steps['reviewdog-enabled-pr'].outputs.result === 'true') { diff --git a/action.yml b/action.yml index b626a04b..52e69ae4 100644 --- a/action.yml +++ b/action.yml @@ -110,14 +110,6 @@ runs: script: return true # REVIEWDOG Steps # REVIEWDOG Setup - - name: Write changed files to file - if: ${{ steps.reviewdog-enabled-pr.outputs.result == 'true' }} - id: write-changed-files - uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 - with: - script: | - const fs = require('fs') - fs.writeFileSync('${{ github.action_path }}/assets/all_changed_files.txt', '${{ steps.changed-files.outputs.all_changed_files }}') - if: ${{ steps.reviewdog-enabled.outputs.result == 'true' }} uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 with: