diff --git a/.github/workflows/reloader-enterprise.yml b/.github/workflows/reloader-enterprise-published.yml similarity index 74% rename from .github/workflows/reloader-enterprise.yml rename to .github/workflows/reloader-enterprise-published.yml index e3ba7074e..262ab835d 100644 --- a/.github/workflows/reloader-enterprise.yml +++ b/.github/workflows/reloader-enterprise-published.yml @@ -1,9 +1,8 @@ -name: Dispatch Event Reloader Enterprise +name: Dispatch event for published release on: - push: - branches: - - master + release: + types: [published] jobs: dispatch: @@ -15,4 +14,4 @@ jobs: -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 '{"event_type":"trigger-event"}' + -d '{"event_type":"release-published"}' diff --git a/.github/workflows/reloader-enterprise-unpublished.yml b/.github/workflows/reloader-enterprise-unpublished.yml new file mode 100644 index 000000000..12126192a --- /dev/null +++ b/.github/workflows/reloader-enterprise-unpublished.yml @@ -0,0 +1,17 @@ +name: Dispatch event for unpublished release + +on: + release: + types: [unpublished ] + +jobs: + dispatch: + runs-on: ubuntu-latest + steps: + - name: Trigger target repository workflow + run: | + 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 '{"event_type":"release-unpublished "}'