Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
oharboe committed Jul 30, 2024
2 parents 325037e + fc71aaa commit 2116c97
Show file tree
Hide file tree
Showing 13 changed files with 57 additions and 1,017 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/github-actions-manual-update-rules.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Manually Trigger Update Rules
on:
workflow_dispatch:
inputs:
type:
description: 'Type of update (overwrite or normal)'
required: true
default: 'normal'

jobs:
update:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Check out repository code recursively
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install Python Packages
run: |
pip install firebase-admin
- name: Execute Python Script Update
env:
CREDS_FILE: ${{ secrets.CREDS_FILE }}
API_BASE_URL: ${{ secrets.API_BASE_URL }}
run: |
if [[ "${{ github.event.inputs.type }}" == "overwrite" ]]; then
python flow/util/updateRules.py --keyFile "${CREDS_FILE}" --apiURL ${API_BASE_URL} --commitSHA $(git rev-parse HEAD) --overwrite
else
python flow/util/updateRules.py --keyFile "${CREDS_FILE}" --apiURL ${API_BASE_URL} --commitSHA $(git rev-parse HEAD)
fi
- name: Push updated rules
id: remote-update
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
if [ -n "$(git status --porcelain)" ]; then
echo "has_update=true" >> "$GITHUB_OUTPUT"
else
echo "has_update=false" >> "$GITHUB_OUTPUT"
fi
git add .
git commit --signoff -m "flow: update rules based on new golden reference"
- if: "steps.remote-update.outputs.has_update == 'true'"
name: update rules pr
id: remote-update-pr
run: |
git push
2 changes: 1 addition & 1 deletion flow/designs/gf180/jpeg/metadata-base-ok.json
Original file line number Diff line number Diff line change
Expand Up @@ -303,4 +303,4 @@
"synth__mem__peak": 722752.0,
"synth__runtime__total": "2:12.36",
"total_time": "0:15:03"
}
}
2 changes: 1 addition & 1 deletion flow/designs/gf180/jpeg/rules-base.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@
"value": -19.07,
"compare": ">="
}
}
}

This file was deleted.

This file was deleted.

Loading

0 comments on commit 2116c97

Please sign in to comment.