@@ -65,14 +65,16 @@ jobs:
65
65
- id : event_out
66
66
name : Write event outputs
67
67
run : |
68
- # Escape the multiline string for Github Actions, see https://github.community/t/set-output-truncates-multiline-strings/16852/3
69
- COMMIT_MESSAGE="${COMMIT_MESSAGE//'%'/'%25'}"
70
- COMMIT_MESSAGE="${COMMIT_MESSAGE//$'\n'/'%0A'}"
71
- COMMIT_MESSAGE="${COMMIT_MESSAGE//$'\r'/'%0D'}"
72
- echo "::set-output name=commit_message::$COMMIT_MESSAGE"
73
- echo "::set-output name=branch_name::$BRANCH_NAME"
74
- echo "::set-output name=target_branch_name::$TARGET_BRANCH_NAME"
75
- echo "::set-output name=previous_commit::$PREVIOUS_COMMIT"
68
+ # Escape the multiline string for Github Actions, see https://lab.amalitsky.com/posts/2022/github-actions-set-output-migration/#migration-from-set-output-to-github-output
69
+ delimiter="$(openssl rand -hex 8)"
70
+ {
71
+ echo "commit_message<<${delimiter}"
72
+ echo $COMMIT_MESSAGE
73
+ echo "${delimiter}"
74
+ } >> $GITHUB_OUTPUT
75
+ echo "branch_name=$BRANCH_NAME" >> $GITHUB_OUTPUT
76
+ echo "target_branch_name=$TARGET_BRANCH_NAME" >> $GITHUB_OUTPUT
77
+ echo "previous_commit=$PREVIOUS_COMMIT" >> $GITHUB_OUTPUT
76
78
- id : verify_out
77
79
name : Write verify job matrix
78
80
run : |
82
84
# - TESTLANG: {lang}
83
85
# with a TESTLANG object in the include array for each language under frameworks
84
86
VERIFY_MATRIX=$(ls -1 frameworks | jq -Rc '.+"/" | select(inside(env.RUN_TESTS)) | rtrimstr("/")' | jq -sc '{include: map({TESTLANG: .})}')
85
- echo "::set-output name= verify_matrix:: $VERIFY_MATRIX"
87
+ echo "verify_matrix= $VERIFY_MATRIX" >> $GITHUB_OUTPUT
86
88
outputs :
87
89
commit_message : ${{ steps.event_out.outputs.commit_message }}
88
90
branch_name : ${{ steps.event_out.outputs.branch_name }}
0 commit comments