From a6fe7ecacb76c6bc5b193b40d3459e546574338b Mon Sep 17 00:00:00 2001 From: HalfLife <6436073+o0HalfLife0o@users.noreply.github.com> Date: Sun, 13 Feb 2022 00:43:31 +0800 Subject: [PATCH] Update test.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. pr的提交也会触发test; 2. test分支不保存历史记录,以免git clone进度太慢,可以到蓝奏或者artifact下载相应的test build --- .github/workflows/test.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1b4d1cf60..864667d29 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,6 +4,7 @@ on: push: branches: - master + pull_request: workflow_dispatch: jobs: @@ -127,11 +128,12 @@ jobs: run: mv */*.apk . ;rm -rf */ - name: Push To "test" Branch run: | + cd $GITHUB_WORKSPACE/apk/ + git init + git checkout -b test git config --global user.name "github-actions[bot]" git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" - git clone "https://${{ github.actor }}:${{ secrets.ACTIONS_TOKEN }}@github.com/${{ github.actor }}/release" -b test test-branch - mv -f $GITHUB_WORKSPACE/apk/*.apk test-branch - cd test-branch + git remote add origin "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.actor }}/release" git add *.apk git commit -m "${{ needs.prepare.outputs.versionL }}" git push -f -u origin test