Skip to content
This repository was archived by the owner on Jun 1, 2024. It is now read-only.

Commit cae3981

Browse files
feat: Adds horusec token (#74)
* Adds horusec token Signed-off-by: Hector Custódio <[email protected]> * Fixes typo Signed-off-by: Hector Custódio <[email protected]>
1 parent 882ba1e commit cae3981

File tree

1 file changed

+26
-16
lines changed

1 file changed

+26
-16
lines changed

.github/workflows/horusec-pr.yml

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,33 @@
1414
# limitations under the License.
1515
#
1616

17-
name: Horusec Validation
17+
name: Horusec Pull Request
1818

1919
on:
20-
pull_request:
21-
branches:
22-
- main
23-
- horusec
24-
- release/*
20+
pull_request:
21+
branches:
22+
- main
23+
- horusec
24+
- release/*
25+
2526
jobs:
26-
horusec-validation:
27-
name: Horusec Validation
28-
runs-on: ubuntu-latest
29-
steps:
30-
- name: Check out code
31-
uses: actions/checkout@v2
27+
horusec:
28+
name: horusec
29+
runs-on: ubuntu-latest
30+
steps:
31+
- name: Check out code
32+
uses: actions/checkout@v2
33+
with:
34+
depth: 0
3235

33-
- name: Running Horusec
34-
run: |
35-
curl -fsSL https://raw.githubusercontent.com/ZupIT/horusec/main/deployments/scripts/install.sh | bash -s latest-rc
36-
horusec start -p . -e true -u "https://api-horusec.zup.com.br" -G true -n "${GITHUB_REPOSITORY}_${GITHUB_REF##*/}"
36+
- name: Running Horusec
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
HORUSEC_CLI_REPOSITORY_AUTHORIZATION: ${{secrets.HORUSEC_TOKEN}}
40+
HORUSEC_CLI_HORUSEC_API_URI: "https://api-horusec.zup.com.br"
41+
HORUSEC_CLI_REPOSITORY_NAME: ${{ github.event.pull_request.head.repo.full_name }}
42+
REPOSITORY_OWNER: ${{ github.event.pull_request.head.repo.full_name }}
43+
run: |
44+
echo "Repository Owner is: ${{env.REPOSITORY_OWNER}}"
45+
curl -fsSL https://raw.githubusercontent.com/ZupIT/horusec/main/deployments/scripts/install.sh | bash -s latest-rc
46+
horusec start -p . -e=$(if [ "${{env.REPOSITORY_OWNER}}" == "ZupIT/beagle-backend-kotlin" ]; then echo "true"; else echo "false"; fi) -G true

0 commit comments

Comments
 (0)