Skip to content

Generate Reports

Generate Reports #222

name: Generate Reports
on:
schedule:
- cron: '0 0 * * *'
issues:
types: [opened, deleted, closed, reopened, labeled]
workflow_dispatch:
jobs:
generate-reports:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10.x'
- name: Install dependencies
run: |
pip install matplotlib pandas requests PyGithub
- name: Check environment variables
env:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
USER: ${{ secrets.USER }}
PROJECT: ${{ secrets.PROJECT }}
run: |
echo "User secret length: ${#USER}"
echo "Project secret length: ${#PROJECT}" # Changed the checks for user and project to length checks (these secrets should probably be changed to variables)
echo "Token length: ${#ACCESS_TOKEN}" # This will print the length of the token to ensure it's set, without exposing it.
- name: Run report generation script
env:
TOKEN: ${{ secrets.GITHUB_TOKEN }} #This should work instead of using a personal access token
USER: ${{ secrets.USER }}
PROJECT: ${{ secrets.PROJECT }}
run: python ishikawa_tools/ishikawa_tools_script.py
- uses: actions/upload-artifact@v4
with:
name: ishikawa-screenshots
path: ./ishikawa_tools/output
retention-days: 1