Skip to content

Commit af6bc11

Browse files
committed
gha: rm skipped job
Signed-off-by: habibayassin <[email protected]>
1 parent e9e4ec6 commit af6bc11

File tree

1 file changed

+2
-48
lines changed

1 file changed

+2
-48
lines changed

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

Lines changed: 2 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
repository_dispatch:
55
types:
66
- set-new-golden
7-
- set-new-golden-overwrite
87

98
jobs:
109
update:
@@ -29,8 +28,8 @@ jobs:
2928
API_BASE_URL: ${{ secrets.API_BASE_URL }}
3029
run: |
3130
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
31+
echo ${{ github.event.client_payload.type }}
32+
if [[ "${{ github.event_name }}" == "repository_dispatch" && "${{ github.event.client_payload.type }}" == "overwrite" ]]; then
3433
python flow/util/updateRules.py --keyFile "${CREDS_FILE}" --apiURL ${API_BASE_URL} --overwrite
3534
else
3635
python flow/util/updateRules.py --keyFile "${CREDS_FILE}" --apiURL ${API_BASE_URL}
@@ -58,48 +57,3 @@ jobs:
5857
branch: bot-update-rules
5958
commit-message: |
6059
[BOT] Update rules
61-
overwrite:
62-
runs-on: ubuntu-latest
63-
strategy:
64-
fail-fast: false
65-
if: github.event_name == 'repository_dispatch' && github.event.client_payload.event_type == 'set-new-golden-overwrite'
66-
steps:
67-
- name: Check out repository code recursively
68-
uses: actions/checkout@v3
69-
with:
70-
submodules: recursive
71-
fetch-depth: 0
72-
- uses: actions/setup-python@v4
73-
with:
74-
python-version: "3.10"
75-
- name: Install Python Packages
76-
run: |
77-
pip install firebase-admin
78-
- name: Execute Python Script
79-
env:
80-
CREDS_FILE: ${{ secrets.CREDS_FILE }}
81-
API_BASE_URL: ${{ secrets.API_BASE_URL }}
82-
run: python flow/util/updateRules.py --keyFile "${CREDS_FILE}" --apiURL ${API_BASE_URL} --overwrite
83-
- name: Push updated rules
84-
id: remote-update
85-
run: |
86-
git config --local user.email "github-actions[bot]@users.noreply.github.com"
87-
git config --local user.name "github-actions[bot]"
88-
echo "::set-output name=has_update::$(git --no-pager diff --name-only origin/master..HEAD)"
89-
git add .
90-
git commit -m "flow: update rules based on new golden reference"
91-
- if: "steps.remote-update.outputs.has_update != ''"
92-
name: Create Draft PR
93-
uses: peter-evans/create-pull-request@v5
94-
with:
95-
token: ${{ github.token }}
96-
signoff: true
97-
delete-branch: true
98-
title: "[BOT] Update rules"
99-
reviewers: |
100-
vvbandeira
101-
maliberty
102-
draft: true
103-
branch: bot-update-rules
104-
commit-message: |
105-
[BOT] Update rules

0 commit comments

Comments
 (0)