Create: 1456-maximum-number-of-vowels-in-a-substring-of-given-length.js #7
Workflow file for this run
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 Files | |
| # cpp | |
| # csharp - https://github.com/dotnet/format ? | |
| # java - prettier-plugin-java | |
| # javascript - prettier | |
| # python - black | |
| # ruby - rufo | |
| # swift - https://github.com/apple/swift-format ? | |
| # typescript - prettier | |
| on: | |
| workflow_dispatch: | |
| pull_request_target: | |
| types: [opened, synchronize, reopened] | |
| jobs: | |
| Format: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [20.x] | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.head_ref }} | |
| fetch-depth: 1 | |
| - name: Use Node.js (dependency) | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Install Rufo (dependency) | |
| run: | | |
| sudo apt update | |
| sudo gem install rufo | |
| - name: Install Prettier | |
| run: | | |
| npm install -g prettier | |
| npm install -g prettier-plugin-java | |
| - name: Install Black | |
| uses: BSFishy/pip-action@v1 | |
| with: | |
| packages: black | |
| - name: Format | |
| run: | | |
| prettier --config "$GITHUB_WORKSPACE/.prettierrc" --write "$GITHUB_WORKSPACE/javascript/*.js" 2>&1 || true | |
| prettier --config "$GITHUB_WORKSPACE/.prettierrc" --write "$GITHUB_WORKSPACE/typescript/*.ts" 2>&1 || true | |
| prettier --config "$GITHUB_WORKSPACE/.prettierrc" --write "$GITHUB_WORKSPACE/java/*.java" 2>&1 || true | |
| rufo "$GITHUB_WORKSPACE/ruby" 2>&1 || true | |
| python -m black "$GITHUB_WORKSPACE/" 2>&1 || true | |
| - name: Push | |
| run: | | |
| git config --global user.email "71089234+Ahmad-A0@users.noreply.github.com" | |
| git config --global user.name "Bot-A0" | |
| git add . | |
| git commit -m "🎨 Format files (🛠️ from Github Actions)" || true | |
| git push || true |