Skip to content

improve readability of filter selection #1

improve readability of filter selection

improve readability of filter selection #1

# Name of the workflow
name: Update Similarity Matrices
on:
# Runs only when a pull request is merged so the data.csv has been altered
pull_request:
types: [closed]
permissions:
contents: write
jobs:
update-matrices:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Set up a GitHub Bot that pushes the changes
- name: Set up GitHub Bot
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11' # or another version if needed
- name: Install update script dependencies
run: pip install -r .github/workflows/requirements_update_similarity_matrices.txt
- name: Run update script
run: python update_similarity_matrices.py
env:
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
# When changes have been made: stage, commit and push them to the repo
- name: Commit and push changes
run: |
git add -A
git diff --cached --quiet || git commit -m "Automated update from GitHub Actions"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}