Skip to content

New video, microphone & mute icons #13

New video, microphone & mute icons

New video, microphone & mute icons #13

name: Keywords autogenerated
on:
workflow_dispatch:
pull_request:
branches:
- production
paths:
- "icons/**"
jobs:
generate-keywords:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Get branch name
uses: rlespinasse/github-slug-action@v3.x
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.x"
- name: Upgrade pip, setuptools, and wheel
run: |
pip install --upgrade pip setuptools wheel
# Paso 3: Instalar dependencias de Python
- name: Install dependencies
run: |
pip install openai python-dotenv --use-pep517
- name: Install prettier
run: npm install -g prettier
- name: Run keywords generator
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
working-directory: .github/keywords
run: python3 keywords-generator.py
- name: Check for changes
id: git_status
run: |
git diff --exit-code || echo "changes"
- name: Commit & Push in ${{ env.GITHUB_REF_SLUG_URL }}
if: steps.git_status.outputs.result == 'changes'
run: |
git add .
git config user.name "github-actions"
git config user.email "github-actions[bot]@users.noreply.github.com"
git commit -am "update changelog"
git push origin ${{ env.GITHUB_REF_SLUG_URL }}