Skip to content

Build out sidecar infrastructure #342

Build out sidecar infrastructure

Build out sidecar infrastructure #342

Workflow file for this run

name: Scan
# Run workflow each time code is pushed to your repository and on a schedule.
# The scheduled workflow runs every at 00:00 on Sunday UTC time.
on:
push:
branches:
- main
pull_request:
env:
REGISTRY: ghcr.io
permissions:
contents: read
security-events: write
actions: read
jobs:
hadolint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: hadolint/[email protected]
with:
dockerfile: Dockerfile.valkey
- uses: hadolint/[email protected]
with:
dockerfile: Dockerfile.controller
- uses: hadolint/[email protected]
with:
dockerfile: Dockerfile.sidecar
gosec:
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Security Scan
uses: securego/gosec@master
with:
# we let the report trigger content trigger a failure using the GitHub Security features.
args: '-fmt sarif -out results.sarif ./...'
- name: Upload SARIF file
if: always()
uses: github/codeql-action/upload-sarif@v3
with:
# Path to SARIF file relative to the root of the repository
sarif_file: results.sarif
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v5
- uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.61.0
# Optional: working directory, useful for monorepos
# working-directory: somedir
# Optional: golangci-lint command line arguments.
# args: --issues-exit-code=0
args: --timeout=5m --config=.golangci.yml
# Optional: show only new issues if it's a pull request. The default value is `false`.
# only-new-issues: true
# Optional: if set to true then the all caching functionality will be complete disabled,
# takes precedence over all other caching options.
# skip-cache: true
# Optional: if set to true then the action don't cache or restore ~/go/pkg.
# skip-pkg-cache: true
# Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
# skip-build-cache: true
trivy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build the Valkey image
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75
id: docker_build_valkey
with:
file: Dockerfile.valkey
context: .
push: false
tags: ${{ env.REGISTRY }}/hyperspike/valkey:${{ github.SHA }}
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: ${{ env.REGISTRY }}/hyperspike/valkey:${{ github.SHA }}
format: 'sarif'
output: 'trivy-results.sarif'
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
if: always()
with:
sarif_file: trivy-results.sarif