Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

⬆️ Bump nio4r from 2.7.3 to 2.7.4 (#4536) #8191

⬆️ Bump nio4r from 2.7.3 to 2.7.4 (#4536)

⬆️ Bump nio4r from 2.7.3 to 2.7.4 (#4536) #8191

Workflow file for this run

name: Continuous integration
on: push
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:17-alpine
ports: ["5432:5432"]
env:
POSTGRES_PASSWORD: postgres
redis:
image: redis:alpine
ports: ["6379:6379"]
opensearch:
image: opensearchproject/opensearch:latest
ports: ["9200:9200"]
env:
discovery.type: single-node
DISABLE_SECURITY_PLUGIN: true
env:
RUBY_YJIT_ENABLE: 1
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Lint with RuboCop
run: bundle exec rubocop --parallel
- name: Setup Node.js
uses: actions/setup-node@v4.1.0
with:
cache: yarn
- name: Install Node modules
run: bin/yarn install --frozen-lockfile
- name: Run ESLint
run: bin/yarn lint
- name: Run Tests
env:
DB_HOST: localhost
DB_USER: postgres
DB_PASSWORD: postgres
RAILS_ENV: test
SECRET_KEY_BASE: we-dont-need-a-secret-here
APP_ADMIN_EMAIL: admin@example.org
APP_ADMIN_PASSWORD: secret
APP_EMAIL: reply@example.org
APP_HOST: example.org
AWS_ACCESS_KEY_ID: my-access-key
AWS_SECRET_ACCESS_KEY: my-secret
AWS_BUCKET: my-bucket
AWS_REGION: eu-central-1
CI: true
NODE_OPTIONS: '--openssl-legacy-provider'
run: |
bundle exec rake assets:precompile
bundle exec rake db:create db:schema:load
bundle exec rake spec
deploy:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master'
needs: test
steps:
- uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build, push and deploy the LATEST image
if: github.ref == 'refs/heads/develop'
run: |
export COMMIT_TIME=$(git show -s --format=%cD ${GITHUB_SHA})
export COMMIT_SHA=${GITHUB_SHA}
docker buildx build --build-arg COMMIT_TIME --build-arg COMMIT_SHA -t ghcr.io/ledermann/docker-rails/docker-rails:latest .
docker push ghcr.io/ledermann/docker-rails/docker-rails:latest
curl -X POST ${{ secrets.DEPLOY_HOOK_APP }}
curl -X POST ${{ secrets.DEPLOY_HOOK_WORKER }}
- name: Build and push the STABLE image
if: github.ref == 'refs/heads/master'
run: |
docker buildx build -t ghcr.io/ledermann/docker-rails/docker-rails:stable .
docker push ghcr.io/ledermann/docker-rails/docker-rails:stable