Skip to content

Merge pull request #3 from c16a/dependabot/go_modules/go_modules-b9ac… #21

Merge pull request #3 from c16a/dependabot/go_modules/go_modules-b9ac…

Merge pull request #3 from c16a/dependabot/go_modules/go_modules-b9ac… #21

Workflow file for this run

name: Push
on:
push:
branches: [ "main" ]
jobs:
codeql:
name: Analyze Go
runs-on: ubuntu-latest
timeout-minutes: 360
permissions:
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: go
build-mode: autobuild
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:go"
devskim:
name: DevSkim
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run DevSkim scanner
uses: microsoft/DevSkim-Action@v1
- name: Upload DevSkim scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: devskim-results.sarif
test:
name: Test
runs-on: ubuntu-latest
needs:
- devskim
- codeql
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.22.2'
- name: Test
run: go test -v ./...
build-linux-amd64:
env:
GOOS: linux
GOARCH: amd64
name: Build (linux/amd64)
needs:
- test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.22.2'
- name: Build
run: go build -ldflags="-s -w" -o microq main.go
build-linux-arm64:
env:
GOOS: linux
GOARCH: arm64
name: Build (linux/arm64)
needs:
- test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.22.2'
- name: Build
run: go build -ldflags="-s -w" -o microq main.go
build-darwin-arm64:
env:
GOOS: darwin
GOARCH: arm64
name: Build (darwin/arm64)
needs:
- test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.22.2'
- name: Build
run: go build -ldflags="-s -w" -o microq main.go
build-windows-amd64:
env:
GOOS: windows
GOARCH: amd64
name: Build (windows/amd64)
needs:
- test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.22.2'
- name: Build
run: go build -ldflags="-s -w" -o microq main.go
build-windows-arm64:
env:
GOOS: windows
GOARCH: arm64
name: Build (windows/arm64)
needs:
- test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.22.2'
- name: Build
run: go build -ldflags="-s -w" -o microq main.go