Skip to content

Commit d26d023

Browse files
authored
use shared config for CD, stale, triage; remove unsupported Ruby versions from CI (#48)
* use shared config for CD, stale, and triage * remove eol'ed and not-yet-released rubies from ci
1 parent d935c9e commit d26d023

4 files changed

Lines changed: 27 additions & 25 deletions

File tree

.github/workflows/cd.yml

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,8 @@ on:
55
workflows: [CI]
66
types: [completed]
77
branches: [main]
8+
89
jobs:
9-
deploy:
10-
runs-on: ubuntu-latest
11-
if: ${{ github.event.workflow_run.conclusion == 'success' }}
12-
steps:
13-
- uses: actions/checkout@v3
14-
- name: Tag and Push Gem
15-
id: tag-and-push-gem
16-
uses: discourse/publish-rubygems-action@v2
17-
env:
18-
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
19-
GIT_EMAIL: ${{secrets.GUSTO_GIT_EMAIL}}
20-
GIT_NAME: ${{secrets.GUSTO_GIT_NAME}}
21-
RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_API_KEY}}
22-
- name: Create GitHub Release
23-
run: gh release create v${{steps.tag-and-push-gem.outputs.gem_version}} --generate-notes
24-
if: ${{ steps.tag-and-push-gem.outputs.new_version == 'true' }}
25-
env:
26-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10+
call-workflow-from-shared-config:
11+
uses: rubyatscale/shared-config/.github/workflows/cd.yml@main
12+
secrets: inherit

.github/workflows/ci.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
name: CI
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
48

59
jobs:
610
rspec:
711
runs-on: ubuntu-latest
812
strategy:
913
matrix:
1014
ruby:
11-
- 2.7
12-
# See comment comes from https://github.com/ruby/setup-ruby#matrix-of-ruby-versions
13-
# Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
14-
- '3.0'
1515
- 3.1
1616
- 3.2
1717
- 3.3
18-
- head
1918
env:
2019
BUNDLE_GEMFILE: Gemfile
2120
name: "RSpec tests: Ruby ${{ matrix.ruby }}"
@@ -37,6 +36,6 @@ jobs:
3736
uses: ruby/setup-ruby@v1
3837
with:
3938
bundler-cache: true
40-
ruby-version: head
39+
ruby-version: 3.3
4140
- name: Run static type checks
4241
run: bundle exec srb tc

.github/workflows/stale.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name: 'Close stale issues and PRs'
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *'
6+
jobs:
7+
call-workflow-from-shared-config:
8+
uses: rubyatscale/shared-config/.github/workflows/stale.yml@main

.github/workflows/triage.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: Label issues as "triage"
2+
3+
on:
4+
issues:
5+
types:
6+
- opened
7+
jobs:
8+
call-workflow-from-shared-config:
9+
uses: rubyatscale/shared-config/.github/workflows/triage.yml@main

0 commit comments

Comments
 (0)