Skip to content

Commit

Permalink
Update synchronize-to-dtk6.yml
Browse files Browse the repository at this point in the history
Signed-off-by: asterwyx <[email protected]>
  • Loading branch information
asterwyx authored Sep 19, 2023
1 parent ab45634 commit 7a5af7d
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions .github/workflows/synchronize-to-dtk6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
git checkout -B ${tbranch}
cd ${{ github.workspace }}/source
if [[ -f ${{ github.workspace }}/source/.syncexclude ]]; then
rsync -avzp --delete --exclude=.git --exclude=.github --exclude=.obs --exclude=debian --exclude=archlinux --exclude=rpm --exclude-from=.syncexclude ${{ github.workspace }}/source ${{ github.workspace }}/dest
rsync -avzp --delete --exclude=.git --exclude=.github --exclude=.obs --exclude=debian --exclude=archlinux --exclude=rpm --exclude-from=.syncexclude ${{ github.workspace }}/source/ ${{ github.workspace }}/dest/
else
rsync -avzp --delete --exclude=.git --exclude=.github --exclude=.obs --exclude=debian --exclude=archlinux --exclude=rpm ${{ github.workspace }}/source/ ${{ github.workspace }}/dest/
fi
Expand All @@ -69,23 +69,17 @@ jobs:
- name: Commit changes to ${{ inputs.dest_repo }}
if: steps.rsync.outputs.has_diff
run: |
cd ${{ github.workspace }}/source
git remote add self-upstream ${{ github.event.repository.clone_url }}
git fetch --all
version=$(git describe)
tbranch=${{ steps.rsync.outputs.tbranch }}
cd ${{ github.workspace }}/dest
git add :/
git commit \
-m "sync: from ${{ github.repository }}" \
-m "Synchronize source files from ${{ github.repository }}." \
-m "Source-version: ${version}
Source-pull-request: https://github.com/${{ github.repository }}/pull/${{ inputs.pull_number }}"
-m "Source-pull-request: https://github.com/${{ github.repository }}/pull/${{ inputs.pull_number }}"
git push -u -f origin ${tbranch}
cd ${{ github.workspace }}/dest
gh repo set-default ${{ inputs.dest_repo }}
result=$(gh pr list --base master --head ${tbranch} --state open)
if [[ -z $result ]]; then
gh pr create -B master -H ${tbranch} --title "sync: from ${{ github.repository }}" --body "Synchronize source files from ${{ github.repository }}.
Source-pull-request: https://github.com/${{ github.repository }}/pull/${{ inputs.pull_number }}"
gh pr create -B master -H ${tbranch} --fill -r linuxdeepin/dtk
fi

0 comments on commit 7a5af7d

Please sign in to comment.