feat: Bypass Docker Hub rate limits, by prioritize docker updates (#73) #17
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@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.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@1bad3abcf0d6ec49a5857d124b0bfb52dc7bb081 # v9.1.3 | |
with: | |
# Determines the way the action fills missing author name and email. Three options are available: | |
# - github_actor -> UserName <UserName@users.noreply.github.com> | |
# - user_info -> Your Display Name <your-actual@email.com> | |
# - 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' |