Skip to content

Bump json from 2.15.0 to 2.15.1 (#141) #459

Bump json from 2.15.0 to 2.15.1 (#141)

Bump json from 2.15.0 to 2.15.1 (#141) #459

Workflow file for this run

name: CI and Docker Build
on:
push:
branches:
- develop
tags:
- v*
pull_request:
branches:
- develop
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 15
env:
CI: true
steps:
- uses: actions/checkout@v5
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Lint with RuboCop
run: bundle exec rubocop
- name: Run RSpec tests
run: bundle exec rspec
- uses: qltysh/qlty-action/coverage@v2
with:
token: ${{secrets.QLTY_COVERAGE_TOKEN}}
files: coverage/.resultset.json
build:
runs-on: ubuntu-latest
needs: test
if: github.actor != 'dependabot[bot]' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository)
permissions:
contents: read
packages: write
steps:
- name: Checkout repo
uses: actions/checkout@v5
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels)
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
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}', 'main') }}
- name: Set up QEMU (for cross-platform builds)
uses: docker/setup-qemu-action@v3
with:
platforms: linux/amd64,linux/arm64
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push multi-arch image
uses: docker/build-push-action@v6
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
BUILDTIME=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}
VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
REVISION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}
provenance: false
cache-from: type=gha
cache-to: type=gha,mode=max
deploy:
runs-on: ubuntu-latest
needs: build
if: ${{ github.actor != 'dependabot[bot]' }}
timeout-minutes: 3
steps:
- name: Send webhook to start deployment
env:
DEPLOY_HOOK: ${{ secrets.DEPLOY_HOOK }}
if: env.DEPLOY_HOOK != null
run: curl -X POST ${{ env.DEPLOY_HOOK }}