Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Restrict users who are able to dispatch deployment #17

Open
jbusecke opened this issue Apr 12, 2024 · 0 comments
Open

Restrict users who are able to dispatch deployment #17

jbusecke opened this issue Apr 12, 2024 · 0 comments

Comments

@jbusecke
Copy link
Contributor

Still needs some discussion, but In general do we want to allow every recipe creator to potentiall fire off giant dataflow jobs?

here is a suggestion by chatgpt how we could potentially limit this to certain people/teams

name: Controlled Workflow Dispatch

on:
  workflow_dispatch:

jobs:
  check_permission:
    runs-on: ubuntu-latest
    steps:
      - name: Check if user is authorized
        run: |
          if [[ "$GITHUB_ACTOR" != "authorized_user1" && "$GITHUB_ACTOR" != "authorized_user2" ]]; then
            echo "You are not authorized to trigger this workflow."
            exit 1
          fi

  main_job:
    needs: check_permission
    runs-on: ubuntu-latest
    steps:
      - name: Execute Main Steps
        run: echo "Running main steps..."
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant