Execute scrappers #51
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: Execute scrappers | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: write | |
pull-requests: write | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 19 */2 * *' | |
jobs: | |
scrappers: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
tool: [helm, cluster-autoscaler, karpenter] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
cache: 'pip' | |
- run: pip install -r ./scripts/scrappers/requirements.txt | |
- name: Execute scrapper | |
run: python ./scripts/scrappers/${{ matrix.tool }}.py > ./tools/${{ matrix.tool }}/data.yaml | |
- name: Create or update PR | |
uses: peter-evans/create-pull-request@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
title: "${{ matrix.tool }} - Update" | |
body: "Updated on ${{ github.sha }}" | |
branch: scrapper/${{ matrix.tool }}/data-update | |
commit-message: "Update for tool ${{ matrix.tool }}" | |
labels: update | |
delete-branch: true |