Skip to content

CCAP-142: Add an API key authentication mechanism to the microservice… #5

CCAP-142: Add an API key authentication mechanism to the microservice…

CCAP-142: Add an API key authentication mechanism to the microservice… #5

Workflow file for this run

name: Main Checks
on:
push:
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- run: git fetch origin main --depth=1
- name: RuboCop Linter
uses: andrewmcodes/rubocop-linter-action@v3.3.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
spec:
runs-on: ubuntu-latest
env:
COVERAGE: 1
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
# runs 'bundle install' and caches installed gems automatically
bundler-cache: true
- name: Run tests
run: bundle exec rspec
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
- name: Build the image
uses: docker/build-push-action@v5
with:
context: .
push: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Scan the image
id: scout
uses: docker/scout-action@v1
with:
command: cves
sarif-file: sarif.output.json
summary: true
- name: Upload SARIF result
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: sarif.output.json