chore(CI): change base branch to sync enterprise
This commit is contained in:
parent
ad43209fc7
commit
d5366c7f5f
|
@ -4,6 +4,7 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
- main-v*
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
sync_to_enterprise:
|
sync_to_enterprise:
|
||||||
|
@ -22,11 +23,16 @@ jobs:
|
||||||
id: create_pull_request
|
id: create_pull_request
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
if [ "$GITHUB_REF" = "refs/heads/master" ]; then
|
||||||
|
EE_REF="refs/heads/enterprise"
|
||||||
|
else
|
||||||
|
EE_REF="${GITHUB_REF}-enterprise"
|
||||||
|
fi
|
||||||
R=$(curl --silent --show-error \
|
R=$(curl --silent --show-error \
|
||||||
-H "Accept: application/vnd.github.v3+json" \
|
-H "Accept: application/vnd.github.v3+json" \
|
||||||
-H "Authorization: token ${{ secrets.CI_GIT_TOKEN }}" \
|
-H "Authorization: token ${{ secrets.CI_GIT_TOKEN }}" \
|
||||||
-X POST \
|
-X POST \
|
||||||
-d '{"title": "Sync code into enterprise from opensource", "head": "master", "base":"enterprise"}' \
|
-d '{"title": "Sync code from opensource $GITHUB_REF to entperprise $EE_REF", "head": "$GITHUB_REF", "base":"$EE_REF"}' \
|
||||||
https://api.github.com/repos/${{ github.repository_owner }}/emqx-enterprise/pulls)
|
https://api.github.com/repos/${{ github.repository_owner }}/emqx-enterprise/pulls)
|
||||||
echo $R | jq
|
echo $R | jq
|
||||||
echo "::set-output name=url::$(echo $R | jq '.url')"
|
echo "::set-output name=url::$(echo $R | jq '.url')"
|
||||||
|
|
Loading…
Reference in New Issue