Skip to content

chore(deps): update all actions #692

chore(deps): update all actions

chore(deps): update all actions #692

name: Continuous Integration
on:
push:
branches: [staging, master]
pull_request:
merge_group:
workflow_call:
inputs:
sha:
description: The commit SHA to run the workflow on
required: false
type: string
secrets:
rails_master_key:
description: The Rails master key
required: true
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
ref: ${{ inputs.sha }}
- name: Build test image
uses: guidojw/actions/build-docker-image@ec8c080252c6b8903a4431211b78c543609f5f89 # v1.4.6
with:
file: Dockerfile
build-args: |
BUNDLE_INSTALL_EXCLUDE=development
name: app
lint:
name: Lint
runs-on: ubuntu-latest
needs: build
services:
db:
image: postgres:14.7
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
ref: ${{ inputs.sha }}
- name: Add problem matchers
run: |
echo '::add-matcher::.github/problem-matchers/actionlint.json'
echo '::add-matcher::.github/problem-matchers/rubocop.json'
- name: Download actionlint
run: |
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) 1.6.26
- name: Load test image
uses: guidojw/actions/load-docker-image@ec8c080252c6b8903a4431211b78c543609f5f89 # v1.4.6
with:
name: app
- name: Lint
env:
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
run: |
EXIT_STATUS=0
./actionlint -ignore 'property "gh_app_private_key" is not defined' -ignore 'SC2153:' \
-ignore 'property "sha" is not defined in object type {}' || EXIT_STATUS=$?
docker run -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -e POSTGRES_HOST=localhost -e \
RAILS_MASTER_KEY --network=host app bin/ci.sh lint || EXIT_STATUS=$?
exit $EXIT_STATUS
test:
name: Test
runs-on: ubuntu-latest
needs: build
services:
db:
image: postgres:14.7
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
ref: ${{ inputs.sha }}
- name: Add problem matchers
run: |
echo '::add-matcher::.github/problem-matchers/rspec.json'
- name: Load test image
uses: guidojw/actions/load-docker-image@ec8c080252c6b8903a4431211b78c543609f5f89 # v1.4.6
with:
name: app
- name: Test
env:
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
run: |
docker run -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -e POSTGRES_HOST=localhost -e \
RAILS_MASTER_KEY --network=host app bin/ci.sh spec