Configuration endpoints to receive osquery configuration from gitOps #1833
Workflow file for this run
This file contains hidden or 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: CI - Pull Requests | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-pr-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| GOLANG_VERSION: 1.26.1 | |
| jobs: | |
| validate: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| strategy: | |
| fail-fast: false | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Set up Go | |
| uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 | |
| with: | |
| go-version: ${{ env.GOLANG_VERSION }} | |
| cache: true | |
| - name: Test (retry) | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| retry() { | |
| local attempts=$1 | |
| shift | |
| local n=1 | |
| until "$@"; do | |
| if [ "$n" -ge "$attempts" ]; then | |
| echo "Command failed after $attempts attempts: $*" | |
| return 1 | |
| fi | |
| n=$((n + 1)) | |
| sleep $((5 * n)) | |
| done | |
| } | |
| retry 3 go test ./... | |
| - name: Validate GoReleaser config | |
| uses: goreleaser/goreleaser-action@ec59f474b9834571250b370d4735c50f8e2d1e29 # v7.0.0 | |
| with: | |
| distribution: goreleaser | |
| version: latest | |
| args: check | |
| - name: Snapshot build (single target sanity) | |
| uses: goreleaser/goreleaser-action@ec59f474b9834571250b370d4735c50f8e2d1e29 # v7.0.0 | |
| with: | |
| distribution: goreleaser | |
| version: latest | |
| args: build --snapshot --clean --single-target |