2023-03-22 13:17:19 +00:00
|
|
|
# Copyright (c) HashiCorp, Inc.
|
|
|
|
# SPDX-License-Identifier: MPL-2.0
|
|
|
|
|
2023-08-22 14:46:03 +00:00
|
|
|
name: Trigger Community Edition to Enterprise Merge
|
2022-05-17 15:32:40 +00:00
|
|
|
on:
|
|
|
|
pull_request_target:
|
|
|
|
types:
|
|
|
|
- closed
|
|
|
|
branches:
|
|
|
|
- main
|
2023-06-23 18:14:55 +00:00
|
|
|
- release/**
|
2022-05-17 15:32:40 +00:00
|
|
|
|
|
|
|
jobs:
|
2023-08-22 14:46:03 +00:00
|
|
|
trigger-ce-merge:
|
|
|
|
# run this only on merge events in CE repo
|
2022-05-17 15:32:40 +00:00
|
|
|
if: ${{ github.event.pull_request.merged && github.repository == 'hashicorp/consul' }}
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Trigger Merge
|
|
|
|
env:
|
|
|
|
GIT_REF: ${{ github.ref_name }}
|
|
|
|
GIT_SHA: ${{ github.sha }}
|
|
|
|
GH_PAT: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
|
|
|
|
GIT_ACTOR: ${{ github.actor }}
|
2023-08-22 14:46:03 +00:00
|
|
|
# TODO(spatel): CE refactor
|
2022-05-17 15:41:23 +00:00
|
|
|
run: |
|
|
|
|
curl -H "Authorization: token $GH_PAT" \
|
|
|
|
-H 'Accept: application/json' \
|
|
|
|
-d "{\"event_type\": \"oss-merge\", \"client_payload\": {\"git-ref\": \"${GIT_REF}\", \"git-sha\": \"${GIT_SHA}\", \"git-actor\": \"${GIT_ACTOR}\" }}" \
|
2023-06-23 18:14:55 +00:00
|
|
|
"https://api.github.com/repos/hashicorp/consul-enterprise/dispatches"
|