Skip to content

Commit

Permalink
updated workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Haken committed Feb 24, 2025
1 parent 959b703 commit 50e3840
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: review

on:
pull_request_review:
types: [submitted]

jobs:
review:
runs-on: ubuntu-latest
steps:
- name: Check if review was approved by specific user
run: |
if [[ github.event.review.state == 'approved' && github.event.review.user.login == 'hakenmt' ]]; then
echo "✅ Test a since review was performed by an allowed user."
else
"🚨 Workflow requires admin review approval."
exit 1
fi
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name: test
on:
workflow_run:
workflows: ["build"]
workflows: ["review"]
types:
- completed

permissions: {}

jobs:
test:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
if: github.event.workflow_run.conclusion == 'success'
runs-on: codebuild-AwsLabsMultiAZWorkshopArm64GithubRunner-${{ github.run_id }}-${{ github.run_attempt }}
environment: AWS
env:
Expand Down

0 comments on commit 50e3840

Please sign in to comment.