drone-plugins / drone-gitea-release

Drone plugin for creating and tagging Gitea releases
http://plugins.drone.io/drone-plugins/drone-gitea-release
Apache License 2.0
64 stars 20 forks source link

can't run in promotion #33

Open fengjiongmax opened 2 years ago

fengjiongmax commented 2 years ago

Hello everyone.

I'm using the gitea-release plugin in my pipeline.

When the steps are not promotion only, the pipeline works fine, the release was created and files uploaded. But when limiting it to run in promotion, I got this error:

msg="The Gitea Release plugin is only available for tags"

To avoid misunderstanding, this is what I've done to get this error.

  1. a tested working pipeline using gitea-release plugin (that the step has no trigger)
  2. add trigger to the step that using gitea-release plugin:
    when:
      event:
      - promote
  3. trigger the build with a tag push(git push origin --tags).
  4. promote the build.

step 1-3 works fine, step 4 got the error.

aminecmi commented 2 years ago

@fengjiongmax did you find a workaround ?

fengjiongmax commented 2 years ago

@aminecmi Yeah, since this plugin only accepts tag trigger, use a tag trigger and the error will be gone. https://github.com/drone-plugins/drone-gitea-release/blob/2087ad8457674e14eb905a1369a6553512a4e1f7/plugin.go#L56-L58

aminecmi commented 2 years ago

Thanks, @fengjiongmax

I'll find a workaround for my usecase.