[Snyk] Security upgrade alpine from 3.13.8 to 3.16.9 #29
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: Go | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ^1.17 | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v2 | |
- name: Get dependencies | |
run: | | |
go get -v -t -d ./... | |
if [ -f Gopkg.toml ]; then | |
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh | |
dep ensure | |
fi | |
- name: Build | |
run: go build -v ./... | |
- name: Test | |
run: make test/unit | |
- name: Run vet & lint | |
run: make test/lint | |
- name: Build docker | |
run: make docker/build version=latest | |
- name: Run Snyk to check Docker image for vulnerabilities | |
continue-on-error: true | |
uses: snyk/actions/docker@master | |
env: | |
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | |
with: | |
image: airenas/audio-convert-service:latest | |
args: --file=build/Dockerfile | |
- name: Upload snyk result to GitHub Code Scanning | |
uses: github/codeql-action/upload-sarif@v1 | |
with: | |
sarif_file: snyk.sarif | |
- name: Calc coverage | |
run: | | |
go test -v -covermode=count -coverprofile=coverage.out ./... | |
- name: Convert coverage.out to coverage.lcov | |
uses: jandelgado/gcov2lcov-action@v1.0.6 | |
- name: Coveralls | |
uses: coverallsapp/github-action@v1.1.2 | |
with: | |
github-token: ${{ secrets.github_token }} | |
path-to-lcov: coverage.lcov |