Skip to content

Commit

Permalink
Update Action Outputs (#9)
Browse files Browse the repository at this point in the history
* Update output

* Update deprecated flag
  • Loading branch information
MattLoe authored Jan 17, 2023
1 parent 45a2a59 commit ee7b101
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ runs:
- id: code
run: |
if [ ${{ github.event_name }} == 'pull_request' ]; then
echo "::set-output name=current_code::${{ github.base_ref }}"
echo "::set-output name=changed_code::${{ github.head_ref }}"
echo "current_code=${{ github.base_ref }}" >> $GITHUB_OUTPUT
echo "changed_code=${{ github.head_ref }}" $GITHUB_OUTPUT
else
echo "::set-output name=current_code::${{ github.event.before }}"
echo "::set-output name=changed_code::${{ github.event.after }}"
echo "current_code=${{ github.event.before }}" $GITHUB_OUTPUT
echo "changed_code=${{ github.event.after }}" $GITHUB_OUTPUT
fi
shell: bash
- id: pmd-analysis
Expand Down
2 changes: 1 addition & 1 deletion pmd-analyser.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ wget https://github.com/pmd/pmd/releases/download/pmd_releases%2F"${PMD_VERSION}
unzip pmd-bin-"${PMD_VERSION}".zip
# Now either run the full analysis or files changed based on the settings defined
if [ "$ANALYSE_ALL_CODE" == 'true' ]; then
pmd-bin-"${PMD_VERSION}"/bin/run.sh pmd -d "$FILE_PATH" -R "$RULES_PATH" -failOnViolation false -f sarif > pmd-raw-output.sarif
pmd-bin-"${PMD_VERSION}"/bin/run.sh pmd -d "$FILE_PATH" -R "$RULES_PATH" --fail-on-violation false -f sarif > pmd-raw-output.sarif
else
if [ "$ACTION_EVENT_NAME" == 'pull_request' ]; then
# Now to determine whether to get the files changed from a git diff or using the files changed in a GitHub Pull Request
Expand Down

0 comments on commit ee7b101

Please sign in to comment.