Update git identity from typescript-bot to typescript-automation[bot]… #1116
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
| name: Format And Commit | |
| concurrency: | |
| group: ${{ github.ref }} | |
| on: | |
| push: | |
| branches: | |
| - master | |
| workflow_dispatch: ~ | |
| jobs: | |
| dprint-fmt: | |
| runs-on: ubuntu-slim | |
| permissions: | |
| contents: write | |
| if: github.repository == 'DefinitelyTyped/DefinitelyTyped' | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: ./.github/actions/setup-for-scripts | |
| - name: Get date | |
| id: date | |
| run: echo "date=$(/bin/date -u "+%Y-%m-%d")" >> $GITHUB_OUTPUT | |
| - uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | |
| with: | |
| # dprint caches info about the files in the repo to skip formatting them. | |
| # However, since package.json and .dprint.jsonc don't change very often, | |
| # using them solely for the cache key would mean that the cache would be | |
| # eventually outdated enough to make the cache useless. To avoid this, | |
| # we also include the date in the cache key to ensure the cache is invalidated | |
| # more often. | |
| key: ${{ runner.os }}-dprint-${{ hashFiles('package.json', '.dprint.jsonc') }}-${{ steps.date.outputs.date }} | |
| path: ~/.cache/dprint | |
| restore-keys: | | |
| ${{ runner.os }}-dprint-${{ hashFiles('package.json', '.dprint.jsonc') }} | |
| ${{ runner.os }}-dprint- | |
| - run: pnpm dprint fmt | |
| - uses: stefanzweifel/git-auto-commit-action@04702edda442b2e678b25b537cec683a1493fcb9 # v7.1.0 | |
| with: | |
| commit_author: 'typescript-automation[bot] <290192711+typescript-automation[bot]@users.noreply.github.com>' | |
| commit_message: '🤖 dprint fmt' | |
| commit_user_email: '290192711+typescript-automation[bot]@users.noreply.github.com' | |
| commit_user_name: 'typescript-automation[bot]' |