Update and rename ruby.yml to RuboCop-Auto-correct.yml

Signed-off-by: VetheonGames <76892542+VetheonGames@users.noreply.github.com>
This commit is contained in:
VetheonGames 2023-07-27 18:33:04 -06:00 committed by GitHub
parent 707c522df3
commit b48e6132f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,17 +1,11 @@
name: Ruby name: RuboCop Auto-correct
on: on:
push: push:
branches: [ "main" ] branches: [ "main" ]
pull_request_target:
branches: [ "main" ]
permissions:
contents: write
pull-requests: write
jobs: jobs:
test: autocorrect:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
@ -19,15 +13,15 @@ jobs:
ruby-version: ['3.2'] ruby-version: ['3.2']
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v2
- name: Set up Ruby - name: Set up Ruby
uses: ruby/setup-ruby@ee2113536afb7f793eed4ce60e8d3b26db912da4 # v1.127.0 uses: ruby/setup-ruby@ee2113536afb7f793eed4ce60e8d3b26db912da4 # v1.127.0
with: with:
ruby-version: ${{ matrix.ruby-version }} ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Install Rubocops latest version - name: Install RuboCop
run: gem install rubocop run: gem install rubocop
- name: Run tests - name: Run RuboCop
run: rubocop -A --fail-level warn run: rubocop -A --fail-level warn
- name: Commit changes - name: Commit changes
run: | run: |
@ -40,6 +34,6 @@ jobs:
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
title: "Apply RuboCop auto-correct" title: "Apply RuboCop auto-correct"
branch: "rubocop-autocorrect" branch: "rubocop-autocorrect-${{ github.run_number }}"
delete-branch: true delete-branch: true
body: "This PR applies RuboCop auto-corrections to the codebase." body: "This PR applies RuboCop auto-corrections to the codebase."