diff --git a/.github/actions/checkout/action.yml b/.github/actions/checkout/action.yml index 0e04fc1ce..3bdcc5709 100644 --- a/.github/actions/checkout/action.yml +++ b/.github/actions/checkout/action.yml @@ -12,8 +12,14 @@ runs: cd Ray git remote set-url origin $REPO_URL git fetch --all - git checkout -f $GITHUB_REF_NAME - git reset --hard origin/$GITHUB_REF_NAME + echo "111" + if [ "$GITHUB_EVENT_NAME" == "pull_request" ]; then + GITHUB_SHA=$(cat $GITHUB_EVENT_PATH | jq -r .pull_request.head.sha) + fi + git checkout -f $GITHUB_SHA + echo "222" + #git reset --hard origin/$GITHUB_REF_NAME + echo "333" git clean -fdx git fetch --tags else diff --git a/.github/workflows/schedule.yml b/.github/workflows/release.yml similarity index 99% rename from .github/workflows/schedule.yml rename to .github/workflows/release.yml index 8f9b9bbe3..70e1eef00 100644 --- a/.github/workflows/schedule.yml +++ b/.github/workflows/release.yml @@ -1,8 +1,9 @@ -name: Schedule +name: Release on: - schedule: - - cron: '0 2 * * *' # Run every day at 1 o'clock + pull_request: + branches: + - 'releases/**' jobs: build-windows-x86_64-rel: