Update testonpush.yml #14
This file contains hidden or 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: Extract open problems | |
| # Controls when the workflow will run | |
| on: | |
| # Triggers the workflow on push or pull request events but only for the "master" branch | |
| push: | |
| branches: [ "master" ] | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| jobs: | |
| extract: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Clone book repository | |
| - uses: actions/checkout@v4 | |
| with: | |
| path: book | |
| # Runs a single command using the runners shell | |
| #- name: Run a one-line script | |
| # run: grep openproblem * | |
| # Runs a set of commands using the runners shell | |
| - name: Run a multi-line script | |
| run: | | |
| # Clone tools repository (it has the script) | |
| git clone https://github.com/assumptionsofphysics/tools tools | |
| # Clone autogen repository (target for the file) | |
| git clone https://gcarcassi:${{ secrets.AUTOGEN_TOKEN }}@github.com/assumptionsofphysics/autogen autogen | |
| # Output the directory contents for debugging | |
| ls -l | |
| # Run the script | |
| python tools/problem-scraper/extractOpenProblems.py autogen/openproblems.yaml book/pm_EnsembleSpaces.tex | |
| # Output of the script for debugging | |
| cat autogen/openproblems.yaml | |
| # Push new list | |
| cd autogen | |
| git config user.name "gcarcassi[bot]" | |
| git config user.email "gabriele.carcassi@gmail.com" | |
| git add openproblems.yaml | |
| git commit -m "Updating open problems" | |
| git push |