Skip to content

Commit 7fa9e77

Browse files
authored
Merge pull request #98 from ruby-no-kai/2025/maintenance
Maintenance for 2025
2 parents cb4461f + d588ec0 commit 7fa9e77

File tree

182 files changed

+8275
-4059
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

182 files changed

+8275
-4059
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
/log/
33
/tmp/
44
/public/packs
5+
/public/vite*
56
vendor/
67
.terraform/

.github/workflows/_test.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Test
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
test:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
11+
- run: docker compose up -d --wait db
12+
- uses: ruby/setup-ruby@d5126b9b3579e429dd52e51e68624dda2e05be25 # v1.267.0
13+
with:
14+
bundler-cache: true
15+
- run: bundle exec rails db:create db:migrate RAILS_ENV=test
16+
- run: bundle exec rspec -f j -o tmp/rspec_results.json -f d spec
17+
- uses: SonicGarden/rspec-report-action@59517533fc21753efb185011e1811e94dc89e02b # v6.0.0
18+
if: always()
19+
with:
20+
json-path: tmp/rspec_results.json

.github/workflows/ci.yml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@ on:
33
push:
44
branches:
55
- master
6+
- main
67
- test
78

89
jobs:
10+
test:
11+
uses: ./.github/workflows/_test.yml
912
build:
1013
name: build
1114
permissions:
@@ -15,38 +18,38 @@ jobs:
1518
outputs:
1619
image-tag: "${{ steps.login-ecr.outputs.registry }}/sponsor-app:${{ github.sha }}"
1720
steps:
18-
- uses: docker/setup-buildx-action@v2
19-
- uses: actions/checkout@v4
21+
- uses: docker/setup-buildx-action@885d1462b80bc1c1c7f0b00334ad271f09369c55 # v2.10.0
22+
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
2023
#- uses: ruby/setup-ruby@v1
2124
# with:
2225
# ruby-version: '3.1'
2326
# bundler-cache: true
24-
- uses: aws-actions/configure-aws-credentials@v4
27+
- uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a # v4.3.1
2528
with:
2629
aws-region: "us-west-2"
2730
role-skip-session-tagging: true
2831
role-to-assume: "arn:aws:iam::005216166247:role/GhaDockerPush"
2932
mask-aws-account-id: false
3033
- id: login-ecr
31-
uses: aws-actions/amazon-ecr-login@v2
34+
uses: aws-actions/amazon-ecr-login@062b18b96a7aff071d4dc91bc00c4c1a7945b076 # v2.0.1
3235
- run: "echo '${{ github.sha }}' > REVISION"
3336
- name: 'Build Docker image'
34-
uses: 'docker/build-push-action@v3'
37+
uses: 'docker/build-push-action@1104d471370f9806843c095c1db02b5a90c5f8b6' # v3.3.1
3538
with:
3639
context: '.'
3740
load: true
3841
tags: "sponsor-app-test:latest,${{ steps.login-ecr.outputs.registry }}/sponsor-app:${{ github.sha }},${{ steps.login-ecr.outputs.registry }}/sponsor-app:latest"
3942
cache-from: type=gha
4043
cache-to: type=gha,mode=max
4144
- name: 'Push Docker image'
42-
uses: 'docker/build-push-action@v3'
45+
uses: 'docker/build-push-action@1104d471370f9806843c095c1db02b5a90c5f8b6' # v3.3.1
4346
with:
4447
context: '.'
4548
push: true
4649
tags: "${{ steps.login-ecr.outputs.registry }}/sponsor-app:${{ github.sha }},${{ steps.login-ecr.outputs.registry }}/sponsor-app:latest"
4750

4851
deploy-prod:
49-
if: "${{ success() && github.event_name == 'push' }}"
52+
if: "${{ success() && github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') }}"
5053
name: deploy-prod
5154
needs: ["build"]
5255
permissions:
@@ -62,13 +65,13 @@ jobs:
6265
env:
6366
BUNDLE_GEMFILE: "${{ github.workspace }}/deploy/Gemfile"
6467
steps:
65-
- uses: actions/checkout@v4
66-
- uses: ruby/setup-ruby@v1
68+
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
69+
- uses: ruby/setup-ruby@d5126b9b3579e429dd52e51e68624dda2e05be25 # v1.267.0
6770
with:
6871
ruby-version: '3.2'
6972
bundler-cache: true
70-
- uses: hashicorp/setup-terraform@v3
71-
- uses: aws-actions/configure-aws-credentials@v4
73+
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
74+
- uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a # v4.3.1
7275
with:
7376
aws-region: "us-west-2"
7477
role-skip-session-tagging: true

.github/workflows/pr.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name: pr
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
test:
8+
uses: ./.github/workflows/_test.yml

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,15 @@
3030
/node_modules
3131
yarn-debug.log*
3232
.yarn-integrity
33+
pnpm-debug.log*
3334
vendor
3435

3536
.terraform/
37+
38+
# Vite Ruby
39+
/public/vite*
40+
node_modules
41+
# Vite uses dotenv and suggests to ignore local-only env files. See
42+
# https://vitejs.dev/guide/env-and-mode.html#env-files
43+
*.local
44+

.overmind.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
OVERMIND_PORT=3000
2+
OVERMIND_PORT_STEP=10

.pinact.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/suzuki-shunsuke/pinact/refs/heads/main/json-schema/pinact.json
2+
# pinact - https://github.com/suzuki-shunsuke/pinact
3+
version: 3
4+
# files:
5+
# - pattern: action.yaml
6+
# - pattern: */action.yaml
7+
8+
ignore_actions:
9+
# - name: slsa-framework/slsa-github-generator/\.github/workflows/generator_generic_slsa3\.yml
10+
# ref: v\d+\.\d+\.\d+
11+
# - name: actions/.*
12+
# ref: main
13+
# - name: suzuki-shunsuke/.*
14+
# ref: release-.*

.postcssrc.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

.ruby-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.4

0 commit comments

Comments
 (0)