[Github Workflows] Only generate navigator files on push to main (#1814)

* [Github Workflows] Only generate navigator files on push to main

* fix workflow logic syntax
This commit is contained in:
Justin Ibarra
2022-03-04 09:55:11 -09:00
committed by GitHub
parent bb105a3c43
commit 6653acb21c
4 changed files with 16 additions and 6 deletions
+4 -1
View File
@@ -33,8 +33,11 @@ jobs:
python -m detection_rules dev license-check
- name: Build release package
env:
# only generate the navigator files on push events to main
GENERATE_NAVIGATOR_FILES: "${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && '--generate-navigator' || ' ' }}"
run: |
python -m detection_rules dev build-release
python -m detection_rules dev build-release $GENERATE_NAVIGATOR_FILES
- name: Archive production artifacts for branch builds
uses: actions/upload-artifact@v2