Skip to content

Commit 3d1572e

Browse files
committed
gha: same job for both
Signed-off-by: habibayassin <[email protected]>
1 parent 2b439bd commit 3d1572e

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/github-actions-update-rules.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
fail-fast: false
14-
if: github.event_name == 'repository_dispatch' && github.event.client_payload.event_type == "set-new-golden"
1514
steps:
1615
- name: Check out repository code recursively
1716
uses: actions/checkout@v3
@@ -24,11 +23,18 @@ jobs:
2423
- name: Install Python Packages
2524
run: |
2625
pip install firebase-admin
27-
- name: Execute Python Script
26+
- name: Execute Python Script Update
2827
env:
2928
CREDS_FILE: ${{ secrets.CREDS_FILE }}
3029
API_BASE_URL: ${{ secrets.API_BASE_URL }}
31-
run: python flow/util/updateRules.py --keyFile "${CREDS_FILE}" --apiURL ${API_BASE_URL}
30+
run: |
31+
echo ${{ github.event_name }}
32+
echo ${{ github.event.client_payload.event_type }}
33+
if [[ "${{ github.event_name }}" == "repository_dispatch" && "${{ github.event.client_payload.event_type }}" == "set-new-golden-overwrite" ]]; then
34+
python flow/util/updateRules.py --keyFile "${CREDS_FILE}" --apiURL ${API_BASE_URL} --overwrite
35+
else
36+
python flow/util/updateRules.py --keyFile "${CREDS_FILE}" --apiURL ${API_BASE_URL}
37+
fi
3238
- name: Push updated rules
3339
id: remote-update
3440
run: |

0 commit comments

Comments
 (0)