-
Notifications
You must be signed in to change notification settings - Fork 174
43 lines (35 loc) · 1.15 KB
/
pre-release-upload.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
on:
pull_request_review:
types: [submitted]
permissions:
contents: read
jobs:
upload:
if: github.head_ref == 'main'
name: Pre-Release Upload to GA
runs-on: ubuntu-latest
env:
API_HOST: ${{ secrets.GA_API_HOST }}
API_TOKEN: ${{ secrets.GA_API_TOKEN }}
steps:
- uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit
- name: Validate Secrets
if: ${{ env.GA_API_HOST == '' || env.GA_API_TOKEN == '' }}
run: |
echo "API_HOST or API_TOKEN not set"
exit 0
- name: Checkout panther-analysis
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 #v4.2.1
- name: Set python version
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 #v5.2.0
with:
python-version: "3.11"
- name: Install pipenv
run: pip install pipenv
- name: Setup venv
run: make venv
- name: upload
run: |
pipenv run panther_analysis_tool upload --api-host ${{ env.GA_API_HOST }} --api-token ${{ env.GA_API_TOKEN }}