Fix unidentified client issue for TCP #9
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: Pull Request | |
on: | |
pull_request: | |
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 | |
image: | |
name: Build Image | |
needs: | |
- build-linux-amd64 | |
- build-linux-arm64 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
platforms: linux/amd64,linux/arm64 | |
push: false | |
tags: | | |
ghcr.io/c16a/microq:rolling | |
docs: | |
name: Build docs site | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
needs: | |
- image | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- run: pip install mkdocs-material | |
- run: mkdocs build |