fix: Disable copier
as not working very well (#112)
#21
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: Convert Template to JSON | |
# No possibility to use on.workflow_run.workflows[Common issues check] inside PR | |
# because GHA sucks - https://github.com/orgs/community/discussions/25220\ | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths: | |
- 'default.template.json5' | |
jobs: | |
generate-renovate-config: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.event.pull_request.head.ref }} | |
- name: Update default.json | |
id: update_json | |
run: | | |
sed 's|\s* //.*||g' default.template.json5 \ | |
| sed -e '/^$/d' \ | |
| sed -e 's/^{$/{\n "description": "THIS FILE IS GENERATED FROM default.template.json5",/' \ | |
> default.json | |
# # Alternative solution, 3-times longer but without sed | |
# - uses: actions-rs/toolchain@v1 | |
# with: | |
# toolchain: stable | |
# - run: cargo install json5-to-json | |
# - name: Generate default.json | |
# id: generate_json | |
# run: | | |
# cat default.template.json5 | json5-to-json > default.json | |
- name: Push fixes | |
uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9.1.4 | |
with: | |
# Determines the way the action fills missing author name and email. Three options are available: | |
# - github_actor -> UserName <[email protected]> | |
# - user_info -> Your Display Name <[email protected]> | |
# - github_actions -> github-actions <email associated with the github logo> | |
# Default: github_actor | |
default_author: github_actor | |
# The message for the commit. | |
# Default: 'Commit from GitHub Actions (name of the workflow)' | |
message: 'chore: Regenerate default.json' |