From b48e6132f0a08cb4b06de696e9339637b0615c37 Mon Sep 17 00:00:00 2001 From: VetheonGames <76892542+VetheonGames@users.noreply.github.com> Date: Thu, 27 Jul 2023 18:33:04 -0600 Subject: [PATCH] Update and rename ruby.yml to RuboCop-Auto-correct.yml Signed-off-by: VetheonGames <76892542+VetheonGames@users.noreply.github.com> --- .../{ruby.yml => RuboCop-Auto-correct.yml} | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) rename .github/workflows/{ruby.yml => RuboCop-Auto-correct.yml} (79%) diff --git a/.github/workflows/ruby.yml b/.github/workflows/RuboCop-Auto-correct.yml similarity index 79% rename from .github/workflows/ruby.yml rename to .github/workflows/RuboCop-Auto-correct.yml index f9fc066..881a815 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/RuboCop-Auto-correct.yml @@ -1,17 +1,11 @@ -name: Ruby +name: RuboCop Auto-correct on: push: branches: [ "main" ] - pull_request_target: - branches: [ "main" ] - -permissions: - contents: write - pull-requests: write jobs: - test: + autocorrect: runs-on: ubuntu-latest strategy: @@ -19,15 +13,15 @@ jobs: ruby-version: ['3.2'] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v2 - name: Set up Ruby uses: ruby/setup-ruby@ee2113536afb7f793eed4ce60e8d3b26db912da4 # v1.127.0 with: ruby-version: ${{ matrix.ruby-version }} bundler-cache: true # runs 'bundle install' and caches installed gems automatically - - name: Install Rubocops latest version + - name: Install RuboCop run: gem install rubocop - - name: Run tests + - name: Run RuboCop run: rubocop -A --fail-level warn - name: Commit changes run: | @@ -40,6 +34,6 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} title: "Apply RuboCop auto-correct" - branch: "rubocop-autocorrect" + branch: "rubocop-autocorrect-${{ github.run_number }}" delete-branch: true body: "This PR applies RuboCop auto-corrections to the codebase."