User management #945
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches-ignore: [main] | |
permissions: | |
packages: write | |
jobs: | |
standard: | |
name: Standard | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
- name: Run Standard | |
run: bundle exec standardrb | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
services: | |
postgres: | |
image: postgres:15.3 | |
ports: ["5432:5432"] | |
env: | |
POSTGRES_HOST_AUTH_METHOD: trust | |
POSTGRES_DB: hackathons_test | |
redis: | |
image: redis:7.0 | |
ports: ["6379:6379"] | |
steps: | |
- name: Install system dependencies | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
run: | | |
sudo apt-get update -yqq | |
sudo apt-get install -yqq libvips | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
- name: Run tests | |
run: bin/rails test; bin/rails test:system | |
env: | |
RAILS_ENV: test | |
DATABASE_URL: postgresql://[email protected]:5432 | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Docker | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to GitHub Packages | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ github.token }} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v4 | |
with: | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
push: true | |
tags: ghcr.io/${{ github.repository }}:${{ github.sha }} |