mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
actions: forked-helper: Don't escape multiline strings
Not needed anymore with GITHUB_OUTPUT. See https://github.com/orgs/community/discussions/26288#discussioncomment-3876281 Instead, use the `toJSON` function that Actions offers to convert the `event` object to JSON.
This commit is contained in:
12
.github/workflows/forked-helper.yml
vendored
12
.github/workflows/forked-helper.yml
vendored
@@ -18,16 +18,6 @@ jobs:
|
||||
id: get_dispatch_secret
|
||||
run: echo "dispatch_secret=${{ secrets.ARMBIAN_SELF_DISPATCH_TOKEN }}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Get event details
|
||||
id: get_event_details
|
||||
# Process JSON according https://github.com/orgs/community/discussions/26288
|
||||
run: |
|
||||
JSON=$(cat ${{ github.event_path }})
|
||||
JSON="${JSON//'%'/'%25'}"
|
||||
JSON="${JSON//$'\n'/'%0A'}"
|
||||
JSON="${JSON//$'\r'/'%0D'}"
|
||||
echo "event_details=${JSON}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Dispatch event on forked repostitory
|
||||
if: steps.get_dispatch_secret.outputs.dispatch_secret
|
||||
uses: peter-evans/repository-dispatch@v3
|
||||
@@ -41,5 +31,5 @@ jobs:
|
||||
"ref": "${{ github.ref }}",
|
||||
"base_ref": "${{ github.base_ref }}",
|
||||
"sha": "${{ github.sha }}",
|
||||
"event_details": ${{ steps.get_event_details.outputs.event_details }}
|
||||
"event_details": ${{ toJSON(github.event) }}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user