Bump google.golang.org/grpc from 1.57.0 to 1.58.3 #310
Workflow file for this run
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: Build & Publish | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
- develop | |
paths-ignore: | |
- '**/*.md' | |
- '**/*.txt' | |
- 'examples/' | |
pull_request: | |
paths-ignore: | |
- '**/*.md' | |
- '**/*.txt' | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: '1.21' | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: v1.54 | |
args: --config=".golangci.yml" --timeout=5m | |
test: | |
name: Test & Scan | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: '1.21' | |
- name: Check out code | |
uses: actions/checkout@v3 | |
with: | |
# Disabling shallow clone is recommended for improving relevancy of reporting | |
fetch-depth: 0 | |
- name: Run Unit tests. | |
run: make test-coverage | |
build: | |
name: Build | |
if: ${{ !github.base_ref }} | |
runs-on: ubuntu-latest | |
needs: [lint, test] | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: '1.21' | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Build | |
run: make build | |
publish: | |
name: Publish | |
if: ${{ !github.base_ref }} # Do not execute on PRs | |
runs-on: ubuntu-latest | |
needs: [lint, test, build] | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Login to DockerHub | |
run: docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build latest container image | |
run: docker build -t kelonio/kelon:${{ github.sha }} -t kelonio/kelon:latest . | |
if: ${{ endsWith(github.ref, 'develop') }} | |
- name: Build stable container image | |
run: docker build -t kelonio/kelon:${{ github.sha }} -t kelonio/kelon:stable . | |
if: ${{ endsWith(github.ref, 'master') }} | |
- name: Run Trivy vulnerability scanner | |
# if: ${{ !github.base_ref }} | |
uses: aquasecurity/trivy-action@master | |
with: | |
image-ref: 'kelonio/kelon:${{ github.sha }}' | |
format: 'template' | |
template: '@/contrib/sarif.tpl' | |
output: 'trivy-results.sarif' | |
severity: 'CRITICAL,HIGH' | |
- name: Upload Trivy scan results to GitHub Security tab | |
# if: ${{ !github.base_ref }} | |
uses: github/codeql-action/upload-sarif@v2 | |
with: | |
sarif_file: 'trivy-results.sarif' | |
- name: Push latest images to DockerHub | |
run: echo kelonio/kelon:${{ github.sha }} kelonio/kelon:latest | xargs -n 1 docker push | |
if: ${{ endsWith(github.ref, 'develop') }} | |
- name: Push stable images to DockerHub | |
run: echo kelonio/kelon:${{ github.sha }} kelonio/kelon:stable | xargs -n 1 docker push | |
if: ${{ endsWith(github.ref, 'master') }} |