Bump errata-ai/vale-action from d074f98809cbae059386851971544a281fd9f593 to 1edf87ba97278a700ba88ed9619172912ffaac25 #2042
Workflow file for this run
This file contains 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: Lint | |
on: [pull_request] | |
jobs: | |
trailing-whitespace: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Check for trailing whitespace | |
uses: raisedevs/find-trailing-whitespace@restrict-to-plaintext-only | |
- name: Check for merge conflicts | |
run: git diff --check | |
shell: bash | |
- name: Ensure all files have newline at EOF | |
uses: Logerfo/newline-action@0.0.4 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
prose: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Vale | |
uses: errata-ai/vale-action@1edf87ba97278a700ba88ed9619172912ffaac25 | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
markdown: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- uses: avto-dev/markdown-lint@v1 | |
with: | |
config: '.github/lint/markdown.json' | |
args: 'docs/**/*.md' | |
changedfiles: | |
runs-on: ubuntu-latest | |
# Map a step output to a job output | |
outputs: | |
all: ${{ steps.changes.outputs.all}} | |
markdown: ${{ steps.changes.outputs.markdown }} | |
steps: | |
# Make sure we have some code to diff. | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Get changed files | |
id: changes | |
# Set outputs using the command. | |
run: | | |
echo "::set-output name=all::$(git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} | xargs)" | |
echo "::set-output name=markdown::$(git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} | grep .md$ | xargs)" | |
changelog: | |
runs-on: ubuntu-latest | |
# require the first job to have ran | |
needs: changedfiles | |
steps: | |
- name: echo changed files | |
run: | | |
if [[ ! "${{needs.changedfiles.outputs.markdown}}" == *"CHANGELOG.md"* ]]; then | |
echo "::error file=CHANGELOG.md,line=1,col=1::Please make sure that you add a docs/CHANGELOG.md entry to describe the changes in this pull request." | |
exit 1 | |
fi | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 2.7 | |
- uses: actions/cache@v3 | |
with: | |
path: vendor/bundle | |
key: gems-build-rails-main-ruby-2.7-${{ hashFiles('**/Gemfile.lock') }} | |
- name: Lint with Rubocop and ERB Lint | |
run: | | |
bundle config path vendor/bundle | |
bundle install | |
bundle exec standardrb -r "rubocop-md" | |
bundle exec erblint **/*.html.erb | |
env: | |
RAILS_VERSION: '~> 7.0.0' |