1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-05 21:15:38 -05:00

gh: use workflow_run trigger for copr

This commit is contained in:
bbedward
2025-10-23 18:17:09 -04:00
parent cc1588debd
commit 8806217d25
2 changed files with 11 additions and 39 deletions

View File

@@ -219,25 +219,3 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Extract plain version
id: plain_version
run: |
set -e
if [[ "$TAG" == v* ]]; then
VERSION="${TAG#v}"
else
VERSION="$TAG"
fi
echo "plain=$VERSION" >> "$GITHUB_OUTPUT"
- name: Trigger Copr release workflow
run: |
set -euo pipefail
VERSION="${{ steps.plain_version.outputs.plain }}"
JSON_PAYLOAD=$(jq -n --arg version "$VERSION" '{inputs:{version:$version}}')
curl -X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/${{ github.repository }}/actions/workflows/copr-release.yml/dispatches \
-d "$JSON_PAYLOAD"