Shared / Copier Update #1
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
| # This file is @generated by <https://github.com/liblaf/copier-shared>. | |
| # DO NOT EDIT! | |
| name: Shared / Copier Update | |
| on: | |
| schedule: | |
| - cron: "0 0 * * 0" # Runs at 00:00, only on Sunday | |
| workflow_dispatch: | |
| env: | |
| FORCE_COLOR: 1 | |
| jobs: | |
| copier-update: | |
| name: Copier Update | |
| permissions: | |
| contents: write | |
| issues: write | |
| pull-requests: write | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: Copier | |
| deployment: false | |
| steps: | |
| - id: auth | |
| name: Auth | |
| uses: liblaf/actions/auth@1f83732587ff97f1babbe9218fdc5436dda1a16f # v1 | |
| with: | |
| app-id: ${{ vars.APP_ID }} | |
| private-key: ${{ secrets.PRIVATE_KEY }} | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - name: Copier update | |
| # Note: Using `copier recopy --force` instead of `copier update` because | |
| # recopy with --force ensures all template files are synchronized with | |
| # the latest version, avoiding merge conflicts that update might create. | |
| run: |- | |
| copier=(pipx run --pip-args cookiecutter copier) | |
| if [[ -d '.config/copier/' ]]; then | |
| find '.config/copier/' -iname '.copier-answers*' -type f -print0 | | |
| while IFS= read -r -d '' answers_file; do | |
| echo "::group::$answers_file" | |
| "${copier[@]}" recopy --skip-answered --trust --answers-file "$answers_file" --force | |
| echo '::endgroup::' | |
| done | |
| fi | |
| - name: Create PR | |
| uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8 | |
| with: | |
| token: ${{ steps.auth.outputs.token }} | |
| commit-message: "chore(copier): update from template" | |
| branch: copier-update/${{ github.ref_name }} | |
| delete-branch: true | |
| sign-commits: true | |
| title: "chore(copier): update from template" | |
| body: Automated changes by [${{ github.workflow }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) Workflow | |
| labels: |- | |
| automerge | |
| copier | |
| assignees: ${{ github.repository_owner }} | |
| reviewers: ${{ github.repository_owner }} |