GH Actions: forked-helper: Fix deprecated ::set-output, fix 404 link

::set-output has been deprecated in 2022: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
This commit is contained in:
ColorfulRhino
2024-03-08 16:19:35 +01:00
committed by Igor
parent 8afe8470f4
commit d3a6e0b26f

View File

@@ -15,16 +15,16 @@ jobs:
steps:
- name: Assign secret
id: get_dispatch_secret
run: echo '::set-output name=dispatch_secret::${{ secrets.ARMBIAN_SELF_DISPATCH_TOKEN }}'
run: echo 'name=dispatch_secret::${{ secrets.ARMBIAN_SELF_DISPATCH_TOKEN }}' >> $GITHUB_OUTPUT
- name: Get event details
id: get_event_details
# Process JSON according https://github.community/t5/GitHub-Actions/set-output-Truncates-Multiline-Strings/td-p/37870
# 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 "::set-output name=event_details::${JSON}"
echo "name=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