Skip to content

fix(deps): update module golang.org/x/sys to v0.41.0 #639

fix(deps): update module golang.org/x/sys to v0.41.0

fix(deps): update module golang.org/x/sys to v0.41.0 #639

Workflow file for this run

name: CI Build & Test
on:
workflow_dispatch:
push:
branches:
- main
paths-ignore:
- docs/**
- "**.md"
- .github/workflows/docs-website.yaml
- .github/workflows/validations.yaml
- .github/workflows/release.yaml
pull_request:
types: [opened, synchronize, reopened]
branches:
- main
paths-ignore:
- docs/**
- "**.md"
- .github/workflows/docs-website.yaml
- .github/workflows/validations.yaml
permissions:
contents: read
packages: write
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
validate:
name: Quality Validations
runs-on: ubuntu-latest
steps:
# Checkout code
- name: Checkout repository
uses: actions/checkout@v6
# Set up Go environment
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version-file: "go.mod"
cache: true
cache-dependency-path: "**/*.sum"
- name: GolangCI Lint
uses: golangci/golangci-lint-action@v9
with:
version: latest
- name: Run format-check
run: |
UNFORMATTED=$(gofmt -l .)
if [ -n "$UNFORMATTED" ]; then
echo "The following files are not formatted according to gofmt:"
echo "$UNFORMATTED"
exit 1
fi
test:
name: Unit Tests
runs-on: ubuntu-latest
steps:
# Checkout code
- name: Checkout repository
uses: actions/checkout@v6
# Set up Go environment
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version-file: "go.mod"
cache: true
cache-dependency-path: "**/*.sum"
- name: Run tests
run: go test -race -cover -covermode=atomic -coverprofile=coverage.txt ./...
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
prepare:
name: Prepare Build Config
runs-on: ubuntu-latest
outputs:
is_pr: ${{ steps.config.outputs.is_pr }}
should_push_docker: ${{ steps.config.outputs.should_push_docker }}
steps:
- id: config
run: |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
# PR builds: no Docker push
echo "is_pr=true" >> "$GITHUB_OUTPUT"
echo "should_push_docker=false" >> "$GITHUB_OUTPUT"
else
# Main branch: push Docker with 'main' tag
echo "is_pr=false" >> "$GITHUB_OUTPUT"
echo "should_push_docker=true" >> "$GITHUB_OUTPUT"
fi
build:
name: Build with GoReleaser
runs-on: ubuntu-latest
needs:
- test
- validate
- prepare
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: "go.mod"
cache: true
cache-dependency-path: "**/*.sum"
- name: Set up Docker Buildx
if: needs.prepare.outputs.should_push_docker == 'true'
uses: docker/setup-buildx-action@v3
- name: Log into registry ${{ env.REGISTRY }}
if: needs.prepare.outputs.should_push_docker == 'true'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Modify GoReleaser config for CI builds
run: |
# Install yq
sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64
sudo chmod +x /usr/local/bin/yq
if [[ "${{ needs.prepare.outputs.is_pr }}" == "true" ]]; then
# PR builds: Skip Docker entirely
yq eval -i 'del(.dockers) | del(.docker_manifests) | del(.docker_signs)' .goreleaser.yaml
else
# Main branch builds: Change image tags to 'main'
yq eval -i '
.dockers[0].image_templates = ["ghcr.io/spechtlabs/tka:main-amd64"] |
.dockers[1].image_templates = ["ghcr.io/spechtlabs/tka:main-arm64"] |
.docker_manifests[0].name_template = "ghcr.io/spechtlabs/tka:main" |
.docker_manifests[0].image_templates = ["ghcr.io/spechtlabs/tka:main-amd64", "ghcr.io/spechtlabs/tka:main-arm64"] |
del(.docker_manifests[1]) | del(.docker_manifests[1]) |
del(.docker_signs)
' .goreleaser.yaml
fi
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
args: release --snapshot --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}