This repository has been archived by the owner on Jan 24, 2025. It is now read-only.
Actualiza estado sensores #1858
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Actualiza estado sensores | |
# Controls when the action will run. | |
on: | |
# push: | |
# branches: | |
# - dev | |
schedule: | |
# Corre todos los días 12 am | |
- cron: "* 5 * * *" | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
actualiza_estado: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.LONDOSO_TOKEN }} | |
- name: Instala Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.12 | |
cache: 'pip' | |
- name: Realiza la actualización de estado de sensores | |
run: | | |
pip install -r requirements_doc.txt | |
python ./data/actualizar_estado.py | |
env: | |
PURPLEAIR_GROUP_ID: ${{ secrets.PURPLEAIR_GROUP_ID }} | |
PURPLEAIR_READ_KEY: ${{ secrets.PURPLEAIR_READ_KEY }} | |
PURPLEAIR_WRITE_KEY: ${{ secrets.PURPLEAIR_WRITE_KEY }} | |
- name: Commit documentación | |
run: | | |
git config user.name londoso | |
git config user.email [email protected] | |
git add . | |
git commit -m "Actualización de documentación" || echo "No hay cambios" | |
git push --force |