mirror of
https://github.com/Slava-Shchipunov/awg-openwrt.git
synced 2026-03-14 01:13:09 +00:00
Merge pull request #15 from Slava-Shchipunov/fix/fix-release-sync-workflow
fix: fix JSON parsing
This commit is contained in:
24
.github/workflows/run-release.yml
vendored
24
.github/workflows/run-release.yml
vendored
@@ -34,20 +34,22 @@ jobs:
|
|||||||
- name: Create release in your repo
|
- name: Create release in your repo
|
||||||
if: steps.check_release.outputs.release_exists == 'false'
|
if: steps.check_release.outputs.release_exists == 'false'
|
||||||
run: |
|
run: |
|
||||||
ART="
|
ART=$(cat <<EOF
|
||||||
_______ ________ __
|
_______ ________ __
|
||||||
| |.-----.-----.-----.| | | |.----.| |_
|
| |.-----.-----.-----.| | | |.----.| |_
|
||||||
| - || _ | -__| || | | || _|| _|
|
| - || _ | -__| || | | || _|| _|
|
||||||
|_______|| __|_____|__|__||________||__| |____|
|
|_______|| __|_____|__|__||________||__| |____|
|
||||||
|__| A M N E Z I A W I R E G U A R D
|
|__| A M N E Z I A W I R E G U A R D
|
||||||
-----------------------------------------------------
|
-----------------------------------------------------
|
||||||
OpenWrt ${{ steps.get_release.outputs.release_tag }}
|
OpenWrt ${{ steps.get_release.outputs.release_tag }}
|
||||||
-----------------------------------------------------"
|
-----------------------------------------------------
|
||||||
|
EOF
|
||||||
|
)
|
||||||
|
|
||||||
curl -X POST https://api.github.com/repos/Slava-Shchipunov/awg-openwrt/releases \
|
curl -X POST https://api.github.com/repos/Slava-Shchipunov/awg-openwrt/releases \
|
||||||
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
|
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d '{
|
-d "$(jq -n --arg tag "${{ steps.get_release.outputs.release_tag }}" \
|
||||||
"tag_name": "'${{ steps.get_release.outputs.release_tag }}'",
|
--arg name "Build amnezia wg for all devices with openwrt ${{ steps.get_release.outputs.release_tag }}" \
|
||||||
"name": "Build amnezia wg for all devices with openwrt '${{ steps.get_release.outputs.release_tag }}'",
|
--arg body "$ART\n\nAutomatically created release for OpenWRT ${{ steps.get_release.outputs.release_tag }}." \
|
||||||
"body": "'"${ART}"'\n\nAutomatically created release for OpenWRT '${{ steps.get_release.outputs.release_tag }}'."
|
'{ tag_name: $tag, name: $name, body: $body }')"
|
||||||
}'
|
|
||||||
Reference in New Issue
Block a user