chore(CI): add git syne workflow
This commit is contained in:
parent
b2d75b3837
commit
cd4614876a
|
@ -356,7 +356,7 @@ jobs:
|
||||||
if: github.event_name == 'release'
|
if: github.event_name == 'release'
|
||||||
run: |
|
run: |
|
||||||
curl --silent --show-error \
|
curl --silent --show-error \
|
||||||
-H "Authorization: token ${{ secrets.AccessToken }}" \
|
-H "Authorization: token ${{ secrets.CI_GIT_TOKEN }}" \
|
||||||
-H "Accept: application/vnd.github.v3+json" \
|
-H "Accept: application/vnd.github.v3+json" \
|
||||||
-X POST \
|
-X POST \
|
||||||
-d "{\"ref\":\"v1.0.1\",\"inputs\":{\"version\": \"${{ env.version }}\", \"emqx_ce\": \"true\"}}" \
|
-d "{\"ref\":\"v1.0.1\",\"inputs\":{\"version\": \"${{ env.version }}\", \"emqx_ce\": \"true\"}}" \
|
||||||
|
@ -366,7 +366,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
if [ -z $(echo $version | grep -oE "(alpha|beta|rc)\.[0-9]") ]; then
|
if [ -z $(echo $version | grep -oE "(alpha|beta|rc)\.[0-9]") ]; then
|
||||||
curl --silent --show-error \
|
curl --silent --show-error \
|
||||||
-H "Authorization: token ${{ secrets.AccessToken }}" \
|
-H "Authorization: token ${{ secrets.CI_GIT_TOKEN }}" \
|
||||||
-H "Accept: application/vnd.github.v3+json" \
|
-H "Accept: application/vnd.github.v3+json" \
|
||||||
-X POST \
|
-X POST \
|
||||||
-d "{\"ref\":\"v1.0.1\",\"inputs\":{\"version\": \"${{ env.version }}\"}}" \
|
-d "{\"ref\":\"v1.0.1\",\"inputs\":{\"version\": \"${{ env.version }}\"}}" \
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
name: Sync to enterprise
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
sync_to_enterprise:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
if: github.repository == 'emqx/emqx'
|
||||||
|
steps:
|
||||||
|
- name: git-sync
|
||||||
|
uses: Rory-Z/git-sync@v3.0.1
|
||||||
|
with:
|
||||||
|
source_repo: ${{ github.repository }}
|
||||||
|
source_branch: ${{ github.ref }}
|
||||||
|
destination_repo: "${{ github.repository_owner }}/emqx-enterprise"
|
||||||
|
destination_branch: ${{ github.ref }}
|
||||||
|
destination_ssh_private_key: "${{ secrets.CI_SSH_PRIVATE_KEY }}"
|
||||||
|
- name: create pull request
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
curl --silent --show-error \
|
||||||
|
-H "Accept: application/vnd.github.v3+json" \
|
||||||
|
-H "Authorization: token ${{ secrets.CI_GIT_TOEKN }}" \
|
||||||
|
-X POST \
|
||||||
|
-d '{"title": "Sync code into enterprise from opensource", "head": "master", "base":"enterprise"}' \
|
||||||
|
https://api.github.com/repos/${{ github.repository_owner }}/emqx-enterprise/pulls
|
Loading…
Reference in New Issue