Skip to content
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
9 changes: 7 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,13 @@ jobs:
with:
go-version: "1.23"

- name: Install libpcap
run: ${{ matrix.install }}
- name: Install libpcap (Linux)
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y libpcap-dev

- name: Install libpcap (macOS)
if: runner.os == 'macOS'
run: brew install libpcap

- name: Run tests
run: make test
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/gitleaks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ jobs:
persist-credentials: false
- name: Set scan range
id: range
env:
EVENT: ${{ github.event_name }}
BASE_SHA: ${{ github.event.pull_request.base.sha }}
BEFORE_SHA: ${{ github.event.before }}
FORCED: ${{ github.event.forced }}
run: |
NULL_SHA="0000000000000000000000000000000000000000"
EVENT="${{ github.event_name }}"
BASE_SHA="${{ github.event.pull_request.base.sha }}"
BEFORE_SHA="${{ github.event.before }}"
FORCED="${{ github.event.forced }}"
if [ "$EVENT" = "pull_request" ] && [ -n "$BASE_SHA" ]; then
echo "log_opts=${BASE_SHA}..HEAD" >> $GITHUB_OUTPUT
elif [ "$EVENT" = "push" ] && [ "$FORCED" \!= "true" ] && [ -n "$BEFORE_SHA" ] && [ "$BEFORE_SHA" \!= "$NULL_SHA" ]; then
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,15 @@ jobs:
CGO_ENABLED: "1"
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
TAG_NAME: ${{ needs.release-please.outputs.tag_name }}
run: |
mkdir -p bin
go build -ldflags="-s -w -X main.version=${{ needs.release-please.outputs.tag_name }}" -o bin/agentsonar-${{ matrix.goos }}-${{ matrix.goarch }} ./cmd/agentsonar
go build -ldflags="-s -w -X main.version=$TAG_NAME" -o "bin/agentsonar-${GOOS}-${GOARCH}" ./cmd/agentsonar

- name: Upload to release
env:
GH_TOKEN: ${{ github.token }}
run: gh release upload ${{ needs.release-please.outputs.tag_name }} bin/agentsonar-${{ matrix.goos }}-${{ matrix.goarch }}
TAG_NAME: ${{ needs.release-please.outputs.tag_name }}
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
run: gh release upload "$TAG_NAME" "bin/agentsonar-${GOOS}-${GOARCH}"
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
VERSION: ${{ github.event.release.tag_name || github.ref_name }}
run: |
mkdir -p bin
go build -ldflags="-s -w -X main.version=$VERSION" -o bin/agentsonar-${{ matrix.goos }}-${{ matrix.goarch }} ./cmd/agentsonar
go build -ldflags="-s -w -X main.version=$VERSION" -o "bin/agentsonar-${GOOS}-${GOARCH}" ./cmd/agentsonar

- name: Upload artifact
uses: actions/upload-artifact@v4
Expand Down
Loading