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

feat: Adds horusec token #74

Merged
merged 2 commits into from
Mar 24, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 26 additions & 16 deletions .github/workflows/horusec-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,33 @@
# limitations under the License.
#

name: Horusec Validation
name: Horusec Pull Request

on:
pull_request:
branches:
- main
- horusec
- release/*
pull_request:
branches:
- main
- horusec
- release/*

jobs:
horusec-validation:
name: Horusec Validation
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
horusec:
name: horusec
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
with:
depth: 0

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