Skip to content

Commit

Permalink
common: exclude line number from generated file
Browse files Browse the repository at this point in the history
Line numer may change what causes `git diff` to produce non-empty
output in Scan-Log calls GHA.
It should be enough to monitor total number of CORE_LOG... call and
ordered list of it. Exact position in the file can not be ensured.

Print non-empty log_calls.diff to GHA log

Signed-off-by: Tomasz Gromadzki <tomasz.gromadzki@intel.com>
  • Loading branch information
grom72 committed Feb 27, 2024
1 parent 59f5696 commit 6b911a6
Show file tree
Hide file tree
Showing 3 changed files with 531 additions and 528 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/scan_log_calls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,16 @@ jobs:
echo "length=$(cat log_calls.diff | wc -l)" >> $GITHUB_OUTPUT
id: log_calls_diff

- name: Non-empty diff
if: steps.log_calls_diff.outputs.length != '0'
run: cat ${{ env.WORKING_DIRECTORY }}/log_calls.diff

- name: Upload artifacts
if: steps.log_calls_diff.outputs.length != '0'
uses: actions/upload-artifact@v3
with:
name: log_calls_diff
path: |
${{ env.WORKING_DIRECTORY }}/log_calls.diff
path: ${{ env.WORKING_DIRECTORY }}/log_calls.diff

- name: Exit code
run: |
Expand Down
Loading

0 comments on commit 6b911a6

Please sign in to comment.