Skip to content

Commit f45cc30

Browse files
authored
Update blossom-ci.yml
Fix CI workflow file
1 parent ca6d4d2 commit f45cc30

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

.github/workflows/blossom-ci.yml

+15-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,21 @@ on:
2626
description: 'argument'
2727
required: false
2828
jobs:
29+
Get-Authorization:
30+
runs-on: blossom
31+
outputs:
32+
AUTHORIZED: ${{ steps.check-authorization.outputs.defined }}
33+
steps:
34+
- id: check-authorization
35+
env:
36+
AUTHORIZED_USERS: ${{ secrets.AUTHORIZED_USERS }}
37+
if: |
38+
contains( ${{ env.AUTHORIZED_USERS }}, format('{0},', github.actor)) &&
39+
github.event.comment.body == '/nvidia-ci'
40+
run: echo "::set-output name=defined::true"
41+
2942
Authorization:
43+
needs: [Get-Authorization]
3044
name: Authorization
3145
runs-on: blossom
3246
env:
@@ -35,9 +49,7 @@ jobs:
3549
args: ${{ env.args }}
3650

3751
# This job only runs for pull request comments
38-
if: |
39-
contains( ${{ env.AUTHORIZED_USERS }}, format('{0},', github.actor)) &&
40-
github.event.comment.body == '/nvidia-ci'
52+
if: needs.Get-Authorization.outputs.check-authorization == 'true'
4153
steps:
4254
- name: Check if comment is issued by authorized person
4355
run: blossom-ci

0 commit comments

Comments
 (0)