Support for osquery 5.8.2 #289
Workflow file for this run
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: Build and test PRs pushed to osctrl | |
on: [push, pull_request] | |
env: | |
GOLANG_VERSION: 1.19.2 | |
OSQUERY_VERSION: 5.6.0 | |
jobs: | |
build_and_test: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
components: ['tls', 'admin', 'api', 'cli'] | |
goos: ['linux', 'darwin', 'windows'] | |
goarch: ['amd64', 'arm64'] | |
steps: | |
########################### Checkout code ########################### | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
########################### Generate SHA1 commit hash ########################### | |
# https://newbedev.com/getting-current-branch-and-commit-hash-in-github-action | |
- name: Declare GIT hash and branch | |
id: vars | |
shell: bash | |
run: | | |
echo ::set-output name=RELEASE_VERSION::${GITHUB_REF#refs/*/} | |
echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" | |
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" | |
########################### Build osctrl ########################### | |
- name: Build osctrl binaries | |
# Build all osctrl components for linux for all archs | |
# Build all osctrl components for darwin for all archs | |
# Build osctrl cli for windows for all archs | |
if: matrix.goos == 'linux' || matrix.goos == 'darwin' || (matrix.goos == 'windows' && matrix.components == 'cli') | |
uses: ./.github/actions/build/binaries | |
with: | |
go_os: "${{ matrix.goos }}" | |
go_arch: "${{ matrix.goarch }}" | |
osctrl_component: "${{ matrix.components }}" | |
commit_sha: "${{ steps.vars.outputs.sha_short }}" | |
commit_branch: "${{ steps.vars.outputs.branch }}" | |
golang_version: "${{ env.GOLANG_VERSION }}" | |
########################### Test binaries ########################### | |
# - name: Run tests | |
# id: bin_tests | |
# uses: ./.github/actions/test/binaries | |
# with: | |
# go_os: "${{ matrix.goos }}" | |
# go_arch: "${{ matrix.goarch }}" | |
# osctrl_component: "${{ matrix.components }}" | |
# commit_sha: "${{ steps.vars.outputs.sha_short }}" | |
# commit_branch: "${{ steps.vars.outputs.branch }}" | |
# golang_version: "${{ env.GOLANG_VERSION }}" |