Pull from cookiecutter #360
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: Pull from cookiecutter | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| # Runs at 0000 UTC | |
| - cron: "0 0 * * *" | |
| permissions: write-all | |
| jobs: | |
| checkout: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install cookiecutter | |
| run: python -m pip install --user cookiecutter | |
| - name: Build Template | |
| run: cookiecutter gh:hackthackathon/hackathon-template-cookiecutter --output-dir .. --config-file .cookiecutter.json --no-input --overwrite-if-exists | |
| - name: Create Pull Request | |
| if: github.ref == 'refs/heads/main' | |
| id: cpr | |
| uses: peter-evans/create-pull-request@v7 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| commit-message: "Latest data: ${{ env.NOW }}" | |
| branch: update-webpage | |
| delete-branch: true | |
| title: "[metrics-ci] webpage auto-update" | |
| body: | | |
| Cookiecutter auto-udpate. | |
| labels: | | |
| Bot | |
| - name: Check outputs | |
| if: ${{ steps.cpr.outputs.pull-request-number }} | |
| run: | | |
| echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" | |
| echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" |