mirror of
https://github.com/stakater/Reloader.git
synced 2026-08-20 20:46:30 +00:00
28 lines
996 B
YAML
28 lines
996 B
YAML
name: Dispatch event for published release
|
|
|
|
on:
|
|
release:
|
|
types: [published]
|
|
|
|
# Authenticates with a PAT, not GITHUB_TOKEN — no token scopes needed.
|
|
permissions: {}
|
|
|
|
jobs:
|
|
dispatch:
|
|
# Skip prereleases (betas) and chart releases; only stable operator
|
|
# releases should trigger the enterprise build.
|
|
if: ${{ !github.event.release.prerelease && !startsWith(github.event.release.tag_name, 'chart-v') }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Trigger target repository workflow
|
|
env:
|
|
RELEASE_TAG: ${{ github.event.release.tag_name }}
|
|
run: |
|
|
payload=$(jq -nc --arg tag "$RELEASE_TAG" \
|
|
'{event_type: "release-published", client_payload: {tag: $tag}}')
|
|
curl -X POST \
|
|
-H "Accept: application/vnd.github.v3+json" \
|
|
-H "Authorization: token ${{ secrets.STAKATER_AB_TOKEN_FOR_RLDR }}" \
|
|
https://api.github.com/repos/stakater-ab/reloader-enterprise/dispatches \
|
|
-d "$payload"
|