From 38685381532388045e79ebd0104a43c073010450 Mon Sep 17 00:00:00 2001 From: zl Date: Mon, 20 Dec 2021 09:24:35 +0800 Subject: [PATCH] fix godeye push method (#4625) --- .github/workflows/tag-workflow.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tag-workflow.yml b/.github/workflows/tag-workflow.yml index 7883871904..b8faca07b4 100644 --- a/.github/workflows/tag-workflow.yml +++ b/.github/workflows/tag-workflow.yml @@ -34,9 +34,15 @@ jobs: echo github_repository: $GITHUB_REPOSITORY echo github_repository: ${{github.repository}} export job_url=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID - if [[ "$tag" =~ "v" ]]; then + if [[ "${{github.event_name}}" == "create" ]]&& [[ "$github_tag" =~ "v" ]]; then export godeye_method=pushRelease fi + if [[ "$branch" == "" ]]; then + export branch=$github_tag + fi + if [[ "$tag" == "" ]]; then + export tag=$github_tag + fi echo "::set-output name=commit::$commit" echo "::set-output name=short::$short" echo "::set-output name=github_tag::$github_tag" @@ -128,7 +134,7 @@ jobs: export link=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/releases/download/${{steps.vars.outputs.github_tag}}/${{steps.vars.outputs.artifact_name}} fi set +e - curl -v --max-time 20 -X PUT ${{secrets.GODEYE_URL}}/${{steps.vars.outputs.godeye_method}} \ + curl --max-time 20 -X PUT ${{secrets.GODEYE_URL}}/${{steps.vars.outputs.godeye_method}} \ --data-urlencode "type=1" \ --data-urlencode "commitId=${{steps.vars.outputs.commit}}" \ --data-urlencode "branch=${{steps.vars.outputs.branch}}" \