Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump golang from 1.20-alpine to 1.21-alpine #133

Merged
merged 4 commits into from
Aug 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
name: Build
on: [push]
on:
push:
branches: [ main ]
tags: [ 'v*' ]
pull_request:
branches: [ main ]

jobs:
test:
runs-on: ubuntu-latest
container:
image: ghcr.io/hairyhenderson/gomplate-ci-build:latest
steps:
- run: |
git config --global user.email "bogus@example.com"
git config --global user.name "Someone"
git config --global --add safe.directory /__w/go-which/go-which
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: make test
- name: make test
run: |
Expand All @@ -26,9 +37,14 @@ jobs:
steps:
- uses: actions/setup-go@v4
with:
go-version: '1.18'
go-version: '1.21'
check-latest: true
- run: |
git config --global user.email "bogus@example.com"
git config --global user.name "Someone"
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: make test
lint:
runs-on: ubuntu-latest
Expand Down
28 changes: 20 additions & 8 deletions .github/workflows/image-scan.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
name: Docker Image Scan
on:
pull_request:
push:
branches:
- master
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
docker-build:
permissions:
security-events: write
runs-on: ubuntu-latest
env:
DOCKER_BUILDKIT: 1
Expand All @@ -16,15 +18,25 @@ jobs:
- name: Quick build (linux/alpine only)
run: |
docker build --target alpine -t go-which .
- name: Scan with Trivy
- name: Run Trivy vulnerability scanner (table output)
uses: aquasecurity/trivy-action@master
with:
image-ref: go-which
format: table
exit-code: 1
ignore-unfixed: true
vuln-type: os,library
severity: CRITICAL,HIGH
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: 'go-which'
format: 'template'
template: '@/contrib/sarif.tpl'
output: 'trivy-results.sarif'
image-ref: go-which
format: sarif
output: trivy-results.sarif
exit-code: 1
ignore-unfixed: true
vuln-type: os,library
severity: CRITICAL,HIGH
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
with:
Expand Down
3 changes: 1 addition & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
run:
go: '1.18'
go: '1.21'

linters-settings:
govet:
Expand Down Expand Up @@ -28,7 +28,6 @@ linters:
enable:
- asciicheck
- bodyclose
- depguard
- dogsled
- dupl
- errcheck
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM hairyhenderson/upx:3.96 AS upx

FROM golang:1.20-alpine AS build
FROM golang:1.21-alpine AS build

RUN apk add --no-cache \
make \
Expand Down
Loading