Update courses #148
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: Update courses | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| catalog: | |
| required: true | |
| type: string | |
| revision: | |
| required: true | |
| type: string | |
| workflow_call: | |
| inputs: | |
| catalog: | |
| required: true | |
| type: string | |
| revision: | |
| required: true | |
| type: string | |
| jobs: | |
| run: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: softprops/turnstyle@v3 | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: master | |
| - uses: cachix/install-nix-action@v25 | |
| with: | |
| github_access_token: ${{secrets.GITHUB_TOKEN}} | |
| extra_nix_config: | | |
| access-tokens = github.com=${{secrets.PAT}} | |
| - name: Update | |
| run: | | |
| jq ".\"${{inputs.catalog}}\".revision = \"${{inputs.revision}}\"" <courses.json >courses.new.json | |
| mv courses.new.json courses.json | |
| nix run .#updateCourses.${{inputs.catalog}} | |
| - name: Commit | |
| run: | | |
| git config user.name lpm-automaton | |
| git config user.email lpm-automaton@protonmail.com | |
| git add -u | |
| git commit -m "Update courses" | |
| git push | |