Skip to content

Commit

Permalink
Split GitHub workflows for master and PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
epistrephein committed Nov 29, 2023
1 parent 5eb69b7 commit c38fffd
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/build.yml → .github/workflows/master.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: build
name: master

on: push
on:
push:
branches:
- master

jobs:
build:
Expand All @@ -19,7 +22,6 @@ jobs:
deploy:
runs-on: ubuntu-latest
needs: build
if: github.ref_name == 'master'
steps:
- name: Install SSH key
uses: shimataro/ssh-key-action@v2
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: pull-request

on:
pull_request:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Run RSpec
run: bundle exec rake spec
- name: Run RuboCop
run: bundle exec rake rubocop

0 comments on commit c38fffd

Please sign in to comment.