Workers billing notifications and CPU limits #1
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: Style guide | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| review: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v3 | |
| - name: Get Changed Files from Pull Request | |
| if: ${{ !cancelled() }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| # get file names and structure as JSON | |
| files=$(gh api /repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files -q '.[] | select(.status != "removed") | .filename | select(test("(.yaml|yml|md)$"))') | |
| filesArray="[$(echo "$files" | sed -e 's/^/"/' -e 's/$/"/' -e 's/ /", "/g' | tr '\n' , | sed 's/,$//')]" | |
| echo "CHANGED_FILES=$filesArray" >> "$GITHUB_ENV" | |
| - name: Output Changed Files | |
| run: echo ${{ env.CHANGED_FILES }} | |
| - name: Vale | |
| uses: errata-ai/vale-action@reviewdog | |
| if: ${{ !cancelled() }} | |
| with: | |
| files: ${{ env.CHANGED_FILES }} | |
| reporter: github-pr-review | |
| filter_mode: diff_context |