JuliaImages / ImageContrastAdjustment.jl

A Julia package for enhancing and manipulating image contrast.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Trigger on label event

CiaranOMara opened this issue · comments

I'm reading through various benchmark workflows to get some ideas as to how to set up my own.

I think the comment below may no longer be true.

# github action workflow doesn't support action on labels
# this function manually check if PR has label "run benchmarks"

Combining:

I think a label trigger can be achieved with the following YAML adjustments.

on:
  label:
    types: [created, edited]

...

steps:
 - name: Triggered by label
   if: ${{ github.event_name == 'label' && github.event.label.name == 'run benchmark' }}

The label event will only trigger a workflow run if the workflow file is on the master or default branch.

All totally untested of course.

Thank you very much for the suggestion. I haven't had time to really look into the benchmark stuff (I think Johnny set it up), but when I do I will check to see if I can incorporate your advice.

Closed by #37

@CiaranOMara The on-label events seem not to work as expected, see #35 and #36. Or did I miss something?

@johnnychen94, you've pushed me over the line to test my suggestion. I found that the on label event gets triggered when creating, editing, or deleting a label, which is not like the activity of labelling a pull request or issue. I think you captured that distinction with your solution - nice!