Skip to content

Commit

Permalink
action.*: Write changed files to file -> cjs
Browse files Browse the repository at this point in the history
  • Loading branch information
thypon committed May 21, 2024
1 parent 2027dac commit 770c996
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
5 changes: 5 additions & 0 deletions action.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down
8 changes: 0 additions & 8 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 770c996

Please sign in to comment.