Skip to content

Bump rubocop-rspec from 2.26.1 to 2.28.0 #290

Bump rubocop-rspec from 2.26.1 to 2.28.0

Bump rubocop-rspec from 2.26.1 to 2.28.0 #290

Workflow file for this run

name: CI
on:
push:
branches:
- main
tags:
- "v**"
pull_request:
concurrency:
group: branch-${{ github.ref }}
cancel-in-progress: true
jobs:
rspec:
runs-on: ubuntu-latest
name: Ruby ${{ matrix.ruby }}
strategy:
matrix:
ruby:
- "3.0.5"
- "3.1.3"
- "3.2.1"
- "3.3.0"
services:
postgres:
image: postgres:9.6.2-alpine
ports:
- 5432:5432
env:
POSTGRES_USER: jamesbond
POSTGRES_DB: postgres
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v1
- name: Install dependent libraries
run: sudo apt install -y postgresql-client
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Bundle install
env:
RAILS_ENV: test
run: |
gem install bundler
bundle install --jobs 4 --retry 3 --path vendor/bundle
- name: Run Lint
run: bundle exec rubocop
- name: Run RSpec
run: bundle exec rspec
env:
POSTGRES_USER: jamesbond
POSTGRES_DB: postgres
CI: true
build-push-image:
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
needs: [rspec]
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Branch name
id: version_name
run: |
echo ::set-output name=no_v_tag::${GITHUB_REF_NAME:1}
- name: Build and push
uses: docker/build-push-action@v4
with:
platforms: linux/amd64,linux/arm64
push: true
build-args: VERSION=${{ steps.version_name.outputs.no_v_tag }}
tags: shayonj/pg-osc:latest, shayonj/pg-osc:${{ steps.version_name.outputs.no_v_tag }}