forked from github/plane
fix: sync changes (#3156)
* fix: sync changes * fix: sync changes * fix: sync changes updated
This commit is contained in:
parent
b7e2f1e57a
commit
f03a9a6de8
16
.github/workflows/create-sync-pr.yml
vendored
16
.github/workflows/create-sync-pr.yml
vendored
@ -3,7 +3,7 @@ name: Create Sync Action
|
|||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- develop # Change this to preview
|
- preview
|
||||||
types:
|
types:
|
||||||
- closed
|
- closed
|
||||||
env:
|
env:
|
||||||
@ -33,24 +33,14 @@ jobs:
|
|||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install gh -y
|
sudo apt install gh -y
|
||||||
|
|
||||||
- name: Create Pull Request
|
- name: Push Changes to Target Repo
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.ACCESS_TOKEN }}
|
GH_TOKEN: ${{ secrets.ACCESS_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
TARGET_REPO="${{ secrets.SYNC_TARGET_REPO_NAME }}"
|
TARGET_REPO="${{ secrets.SYNC_TARGET_REPO_NAME }}"
|
||||||
TARGET_BRANCH="${{ secrets.SYNC_TARGET_BRANCH_NAME }}"
|
TARGET_BRANCH="${{ secrets.SYNC_TARGET_BRANCH_NAME }}"
|
||||||
TARGET_BASE_BRANCH="${{ secrets.SYNC_TARGET_BASE_BRANCH_NAME }}"
|
|
||||||
SOURCE_BRANCH="${{ env.SOURCE_BRANCH_NAME }}"
|
SOURCE_BRANCH="${{ env.SOURCE_BRANCH_NAME }}"
|
||||||
PR_TITLE="${{secrets.SYNC_PR_TITLE}}"
|
|
||||||
|
|
||||||
git checkout $SOURCE_BRANCH
|
git checkout $SOURCE_BRANCH
|
||||||
git remote add target-origin "https://$GH_TOKEN@github.com/$TARGET_REPO.git"
|
git remote add target-origin "https://$GH_TOKEN@github.com/$TARGET_REPO.git"
|
||||||
git push target-origin $SOURCE_BRANCH:$TARGET_BRANCH
|
git push target-origin $SOURCE_BRANCH:$TARGET_BRANCH
|
||||||
|
|
||||||
|
|
||||||
gh pr create \
|
|
||||||
--base $TARGET_BASE_BRANCH \
|
|
||||||
--head $TARGET_BRANCH \
|
|
||||||
--title "sync changes" \
|
|
||||||
--body "sync changes" \
|
|
||||||
--repo $TARGET_REPO
|
|
Loading…
Reference in New Issue
Block a user