Skip to content
This repository was archived by the owner on Jul 19, 2023. It is now read-only.

Commit 0e5cc9c

Browse files
authoredOct 16, 2022
Update allero-policies-runner.yml
Allow configuring allero token in the pipeline validator action
1 parent 483c15a commit 0e5cc9c

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed
 

‎.github/workflows/allero-policies-runner.yml

+11-6
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,27 @@ on:
88

99
env:
1010
ALLERO_GITHUB_TOKEN: ${{ secrets.ALLERO_GITHUB_TOKEN }}
11+
ALLERO_TOKEN: ${{ secrets.ALLERO_TOKEN }}
12+
1113

1214
jobs:
1315
allero-validate:
1416
runs-on: ubuntu-latest
1517
steps:
18+
- name: Missing GitHub Token
19+
if: ${{ env.ALLERO_GITHUB_TOKEN != '' }}
20+
run: |
21+
echo "::notice::Couldn'nt find an ALLERO_GITHUB_TOKEN, set up the token to validate private repositories."
22+
1623
- name: Get allero cli
1724
run: curl https://get.allero.io | bash
1825

1926
- name: Fetch all organization workflow files from all repositories
2027
run: allero fetch github ${{ github.repository_owner }}
2128

29+
- name: Allero Config Token
30+
if: ${{ env.ALLERO_TOKEN != '' }}
31+
run: |
32+
allero config set token $ALLERO_TOKEN
2233
- name: Run policies validation
2334
run: allero validate
24-
25-
- name: Missing GitHub Token
26-
run: |
27-
if [ ! "$ALLERO_GITHUB_TOKEN" ]; then
28-
echo "::notice::Policies ran only on public repositories associated with your organization. Define ALLERO_GITHUB_TOKEN with your GitHub PAT as an Encrypted Secret to run on your private repos."
29-
fi

0 commit comments

Comments
 (0)
This repository has been archived.