Skip to content

Commit

Permalink
.github/workflows/google-fonts.yml: create individual commits
Browse files Browse the repository at this point in the history
  • Loading branch information
bevanjkay committed Oct 1, 2024
1 parent 59618b0 commit cc4c651
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/google-fonts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,23 @@ jobs:
run: git checkout -b "auto-${{ matrix.mode }}-google-fonts"

- name: Create commits
if: env.changes == 'true'
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."
for FILENAME in $(git ls-files --modified); do
MESSAGE="$(echo "$FILENAME" | sed -e 's|^Casks/font/font-[a-z]/||' \
-e 's/\.rb//' \
-e 's/$/: /')"
git add "$FILENAME"
git commit "$FILENAME" --message="${MESSAGE} ${{matrix.mode}}" --message="$COMMIT_BODY"
done
env:
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 }}
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.
- name: Push commits
if: env.changes == 'true'
Expand Down

0 comments on commit cc4c651

Please sign in to comment.