Skip to content

Commit 7314e3c

Browse files
author
Gustavo Flores
authored
fix: move secret check from job-level to step-level on sync-dashboard-team (#1912)
1 parent 504fef1 commit 7314e3c

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

.github/workflows/sync-dashboard-team.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@ permissions:
2929
jobs:
3030
# Add validation checks for Pull Requests
3131
validate:
32-
if: github.event_name == 'pull_request' && secrets.ORG_ADMIN_TOKEN != ''
32+
if: github.event_name == 'pull_request'
3333
runs-on: ubuntu-latest
34+
env:
35+
ORG_ADMIN_TOKEN: ${{ secrets.ORG_ADMIN_TOKEN }}
3436

3537
permissions:
3638
contents: read
@@ -51,11 +53,12 @@ jobs:
5153
run: npm ci
5254

5355
- name: Dry run
56+
if: env.ORG_ADMIN_TOKEN != ''
5457
working-directory: .github/scripts
5558
run: node sync-dashboard-team.js
5659
env:
5760
DRY_RUN: true
58-
GITHUB_TOKEN: ${{ secrets.ORG_ADMIN_TOKEN }}
61+
GITHUB_TOKEN: ${{ env.ORG_ADMIN_TOKEN }}
5962
ORG: kernelci
6063
TEAM_SLUG: dashboard
6164

0 commit comments

Comments
 (0)