From e63a2bb49620d2b68615f1ef8420fbe6b286b3f2 Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Wed, 8 May 2024 15:57:42 +0200 Subject: [PATCH] action.yml: trial and error --- action.yml | 9 +++++++-- assets/reviewdog.sh | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index 52413c52..a32fed6e 100644 --- a/action.yml +++ b/action.yml @@ -209,8 +209,13 @@ runs: - if: ${{ steps.reviewdog-enabled-full.outputs.result == 'true' }} name: Run reviewdog full id: run-reviewdog-full - shell: bash - run: unset GITHUB_BASE_REF && ${{ github.action_path }}/assets/reviewdog.sh + uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 + with: + script: | + const { execSync } = require('child_process') + const cmd = execSync('${{ github.action_path }}/assets/reviewdog.sh', {env: {...process.env, GITHUB_BASE_REF: ''}}) + console.log(cmd.stdout.toString()) + console.log(cmd.stderr.toString()) - id: comments-after if: ${{ steps.reviewdog-enabled-pr.outputs.result == 'true' }} uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 diff --git a/assets/reviewdog.sh b/assets/reviewdog.sh index eccecf79..46f9c78d 100755 --- a/assets/reviewdog.sh +++ b/assets/reviewdog.sh @@ -11,9 +11,9 @@ export ASSIGNEES=$(echo "$ASSIGNEES" | sed 's|\([^ ]\)|@\1|' | tr -s '\n' ' ') RUNNERS="safesvg tfsec semgrep sveltegrep npm-audit pip-audit" # disabled: brakeman echo "pwd: $(pwd)" -echo "env: " +echo "env: $(printenv)" printenv -exit 1 +#exit 1 if [ -n "${GITHUB_BASE_REF+set}" ]; then for runner in $RUNNERS; do