From 267696735e046d7ed68affb5e46d5ea81f06cea0 Mon Sep 17 00:00:00 2001 From: Ofir Bino Date: Fri, 1 Mar 2024 18:39:12 +0200 Subject: [PATCH] Verify release manager in prod.yaml for Github workflows on release branches --- .github/workflows/prod.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/prod.yaml b/.github/workflows/prod.yaml index bd34634..1d3ff72 100644 --- a/.github/workflows/prod.yaml +++ b/.github/workflows/prod.yaml @@ -11,7 +11,17 @@ jobs: - uses: actions/checkout@v3 - name: Build run: | + release_manager="Thebinoman" + push_user="${{ github.actor }}" + echo building and packing and app... + + if [[ "$push_user" != "$release_manager" ]]; then + echo "Workflow aborted. User $push_user is not authorized for release." + exit 1 + else + echo "$push_user is authorized for release." + fi DeploySimulation: runs-on: ubuntu-latest needs: BuildSimulation