Skip to content

Commit

Permalink
updates github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
danielpeter committed May 3, 2023
1 parent 9c700a1 commit 6054f6b
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,20 @@ jobs:
export DIFF=$( git diff --name-only ${{ github.event.before }} $GITHUB_SHA )
echo " diff between ${{ github.event.before }} and $GITHUB_SHA"
fi
echo "$DIFF"
echo "***"; echo "$DIFF"; echo "***"
# Escape newlines (replace \n with %0A)
echo "::set-output name=diff::$( echo "$DIFF" | sed ':a;N;$!ba;s/\n/%0A/g' )"
# deprecated:
#echo "::set-output name=diff::$( echo "$DIFF" | sed ':a;N;$!ba;s/\n/%0A/g' )"
# new:
# replace new line with %0A - will result finding only one file with a very long name...
#echo "diff=$( echo "$DIFF" | sed ':a;N;$!ba;s/\n/%0A/g' )" >> $GITHUB_OUTPUT
# doesn't work...
#echo "diff=\"$DIFF\"" >> "$GITHUB_OUTPUT"
# new multi-line format:
# (https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings)
echo "diff<<EOF" >> $GITHUB_OUTPUT
echo "$DIFF" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Output changes
run: echo "${{ steps.diff.outputs.diff }}"
Expand Down Expand Up @@ -151,7 +162,7 @@ jobs:

- name: Cache Intel oneapi packages
id: cache-intel-oneapi
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: /opt/intel/oneapi
key: install-${{ runner.os }}-all
Expand Down

0 comments on commit 6054f6b

Please sign in to comment.