From b3dc104f02c85b267b00e1f77a901a46ef0bcc19 Mon Sep 17 00:00:00 2001 From: Bevan Kay Date: Tue, 1 Oct 2024 20:45:47 +1000 Subject: [PATCH] .github/workflows/google-fonts.yml: create individual commits --- .github/workflows/google-fonts.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/google-fonts.yml b/.github/workflows/google-fonts.yml index 72bd8a5a26c66..e1393cdbb10c3 100644 --- a/.github/workflows/google-fonts.yml +++ b/.github/workflows/google-fonts.yml @@ -73,14 +73,20 @@ jobs: - name: Create commits if: env.changes == 'true' run: | - git add . - git commit \ - --message "${{matrix.mode}} Google Fonts" \ - --message "This commit was created automatically by the [\`google-fonts\`](https://github.com/Homebrew/homebrew-cask/blob/master/.github/workflows/google-fonts.yml) workflow." + git ls-files --modified --others -z | xargs -0 -I {} sh -c " + FILENAME=\"{}\" + MESSAGE=\$(basename \"\$FILENAME\" .rb) + git add \"\$FILENAME\" + git commit \"\$FILENAME\" --message=\"\$MESSAGE: \$MODE\" --message=\"\$COMMIT_BODY\"" env: + COMMIT_BODY: > + This commit was created automatically by the + [\`google-fonts\`](https://github.com/Homebrew/homebrew-cask/blob/master/.github/workflows/google-fonts.yml) + workflow. GIT_COMMITTER_NAME: ${{ steps.git-user-config.outputs.name }} GIT_COMMITTER_EMAIL: ${{ steps.git-user-config.outputs.email }} HOMEBREW_GPG_PASSPHRASE: ${{ secrets.BREWTESTBOT_GPG_SIGNING_SUBKEY_PASSPHRASE }} + MODE: ${{ matrix.mode }} - name: Push commits if: env.changes == 'true'