Bump irb from 1.14.1 to 1.14.2 (#2823) #6481
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: 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 | |
env: | |
DB_HOST: localhost | |
DB_USER: postgres | |
DB_PASSWORD: postgres | |
RAILS_ENV: test | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
- name: Lint with RuboCop | |
run: bin/rubocop --parallel | |
- name: Scan for common Rails security vulnerabilities using static analysis | |
run: bin/brakeman --no-pager | |
- name: Setup Node.js | |
uses: actions/[email protected] | |
with: | |
cache: yarn | |
- name: Install Yarn packages | |
run: yarn install --immutable | |
- name: Lint with ESLint | |
run: yarn lint | |
- name: Compile assets | |
run: bin/rails assets:precompile | |
- name: Run Tests | |
run: | | |
bundle exec rake db:prepare | |
bundle exec rake test | |
bundle exec rake test:system | |
deploy: | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/master' | |
needs: test | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Fetch tag annotations | |
# https://github.com/actions/checkout/issues/290 | |
run: git fetch --tags --force | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
# list of Docker images to use as base name for tags | |
images: | | |
ghcr.io/ledermann/pingcrm | |
# generate Docker tags based on the following events/attributes | |
tags: | | |
type=ref,event=branch | |
type=ref,event=pr | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}}.{{minor}} | |
type=semver,pattern={{major}} | |
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set ENV values | |
run: | | |
echo "COMMIT_TIME=$(git show -s --format=%cI $GITHUB_SHA)" >> $GITHUB_ENV | |
echo "COMMIT_VERSION=$(git describe --always)" >> $GITHUB_ENV | |
- name: Build and push | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
platforms: linux/amd64 | |
provenance: false | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
build-args: | | |
COMMIT_SHA=${{ github.sha }} | |
COMMIT_TIME=${{ env.COMMIT_TIME }} | |
COMMIT_VERSION=${{ env.COMMIT_VERSION }} | |
COMMIT_BRANCH=${{ github.head_ref || github.ref_name }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
- name: Send webhook to start deployment | |
env: | |
DEPLOY_HOOK: ${{ secrets.DEPLOY_HOOK }} | |
if: env.DEPLOY_HOOK != null | |
run: curl -X POST ${{ env.DEPLOY_HOOK }} |