2022-05-13 10:15:29 +00:00
name : Generate osqueryd targets for Orbit
on :
push :
branches :
- main
paths :
# The workflow can be triggered by modifying OSQUERY_VERSION env.
- '.github/workflows/generate-osqueryd-targets.yml'
pull_request :
paths :
# The workflow can be triggered by modifying OSQUERY_VERSION env.
- '.github/workflows/generate-osqueryd-targets.yml'
workflow_dispatch :
2022-10-07 15:43:56 +00:00
defaults :
run :
# fail-fast using bash -eo pipefail. See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference
shell : bash
2022-05-13 10:15:29 +00:00
env :
2022-08-19 15:15:24 +00:00
OSQUERY_VERSION : 5.5 .1
2022-05-13 10:15:29 +00:00
permissions :
contents : read
jobs :
generate-macos :
runs-on : macos-latest
steps :
- name : Checkout
2022-08-31 10:44:22 +00:00
uses : actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v2
2022-05-13 10:15:29 +00:00
- name : Generate osqueryd.app.tar.gz
run : |
make osqueryd-app-tar-gz out-path=. version=$OSQUERY_VERSION
- name : Upload osqueryd.app.tar.gz
2022-06-22 19:07:08 +00:00
uses : actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v2
2022-05-13 10:15:29 +00:00
with :
name : osqueryd.app.tar.gz
path : osqueryd.app.tar.gz
generate-linux :
runs-on : ubuntu-latest
steps :
- name : Checkout
2022-08-31 10:44:22 +00:00
uses : actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v2
2022-05-13 10:15:29 +00:00
- name : Download and extract osqueryd for linux
run : |
2022-06-20 18:13:01 +00:00
curl -L https://github.com/osquery/osquery/releases/download/${{ env.OSQUERY_VERSION }}/osquery_${{ env.OSQUERY_VERSION }}-1.linux_amd64.deb --output osquery.deb
ar x osquery.deb
tar xf data.tar.gz
2022-05-13 10:15:29 +00:00
chmod +x ./opt/osquery/bin/osqueryd
./opt/osquery/bin/osqueryd --version
- name : Upload osqueryd for linux
2022-06-22 19:07:08 +00:00
uses : actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v2
2022-05-13 10:15:29 +00:00
with :
name : osqueryd
path : opt/osquery/bin/osqueryd
generate-windows :
runs-on : windows-latest
steps :
- name : Checkout
2022-08-31 10:44:22 +00:00
uses : actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v2
2022-05-13 10:15:29 +00:00
- name : Download osquery msi for Windows
run : |
2022-06-13 15:04:21 +00:00
curl -L https://github.com/osquery/osquery/releases/download/${{ env.OSQUERY_VERSION }}/osquery-${{ env.OSQUERY_VERSION }}.msi --output osquery-${{ env.OSQUERY_VERSION }}.msi
2022-05-13 10:15:29 +00:00
- name : Extract osqueryd.exe for Windows
shell : cmd
run : |
msiexec /a osquery-${{ env.OSQUERY_VERSION }}.msi /qb TARGETDIR=C:\temp
C:\temp\osquery\osqueryd\osqueryd.exe --version
- name : Upload osqueryd for Windows
2022-06-22 19:07:08 +00:00
uses : actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v2
2022-05-13 10:15:29 +00:00
with :
name : osqueryd.exe
2022-06-13 15:04:21 +00:00
path : C:\temp\osquery\osqueryd\osqueryd.exe