Is it possible to put restrictions on who can run the workflow

I have a workflow which is designed to build and release the application but would like put some restrictions on who can invoke the workflow.

Event used: workflow dispatch

Hi @DeepzMat,

Glad to see you in Github Community Forum!

It’s NOT supported to put such restrictions.

As an alternative, you can add a job level if expression, check the github.actor, only allow the specific user to start the job. Code sample as below:

on:
  workflow_dispatch:
jobs:
  job1:
    if: github.actor=='username'   # specify the username here

Thanks

@weide-zhou Thanks for reverting. Let me explore this further.

The reason why we need to put some checks is because we don’t want to let anyone make the release and would like to restrict it to Business/Leads.

on:
workflow_dispatch:
inputs:
scheme:
description: ‘Build Scheme Name’
required: true

Is it possible to provide a drop-down option to end user and let them choose the relevant values ?

Hi @DeepzMat,

Thanks for your quick reply!

It seems you have same requirements with this ticket, currently option list is not supported.

You can also raise a feature request here to promote the improvement.

Thanks

Thanks @weide-zhou. I will keep a track of the same.

I have the same requirement. Following this thread.