diff --git a/.github/workflows/publish-module.yaml b/.github/workflows/publish-module.yaml new file mode 100644 index 0000000..cfa2f4b --- /dev/null +++ b/.github/workflows/publish-module.yaml @@ -0,0 +1,25 @@ +name: CI + +on: + workflow_call: + +jobs: + trigger-release: + name: Trigger Release + runs-on: ubuntu-latest + steps: + - uses: actions/create-github-app-token@v2 + id: login + with: + repositories: | + enablement-platform-terraform-module-publishing + app-id: 2252287 # references EP Terraform Module Trigger GitHub App + private-key: ${{ secrets.GH_APP_EP_TF_MODULE_TRIGGER_PRIVATE_KEY }} + + - name: Send repository_dispatch to publisher + run: | + curl -X POST \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ steps.login.outputs.token }}" \ + https://api.github.com/repos/schubergphilis-ep/enablement-platform-terraform-module-publishing/dispatches \ + -d '{"event_type":"publish-module","client_payload":{"repository":"${{ github.repository }}", "version": "${{ github.ref_name }}"}}'