mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 00:49:03 +00:00
* Update build-binaries.yaml Pin action versions + add read only token to build-binaries.yaml * Update codeql-analysis.yml Pin dependencies with hash for codeql-analysis.yml * Update deploy-fleet-website.yml Pin dependencies in deploy-fleet-website.yml * Update docs.yml Pin dependencies for docs.yml * Update fleet-and-orbit.yml Pinning dependencies for fleet-and-orbit.yml * Update generate-osqueryd-app-tar-gz.yml Pin dependencies for generate-osqueryd-app-tar-gz.yml * Pin dependencies in goreleaser workflows Pinned dependencies in the 3 goreleaser workflows * Update integration.yml Pinned dependencies with hash * Update pr-helm.yaml Pinned dependencies with hash * Update push-osquery-perf-to-ecr.yml Pinned dependencies with a hash * Update release-helm.yaml Pinned one dependency with a hash * Update semgrep-analysis.yml Pinned dependencies with hashes * Update test-go.yaml Pinned dependencies with hash * Update test-packaging.yml Pinned dependencies with hashes * Update test-website.yml Pinned dependencies with hashes * Update test.yml Pinned dependencies with hashes
74 lines
No EOL
1.9 KiB
YAML
74 lines
No EOL
1.9 KiB
YAML
name: Build binaries
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build-binaries:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Install Go
|
|
uses: actions/setup-go@bfdd3570ce990073878bf10f6b2d79082de49492 # v2
|
|
with:
|
|
go-version: 1.17
|
|
|
|
- name: Checkout Code
|
|
uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2
|
|
|
|
- name: JS Dependency Cache
|
|
id: js-cache
|
|
uses: actions/cache@661fd3eb7f2f20d8c7c84bc2b0509efd7a826628 # v2
|
|
with:
|
|
path: |
|
|
**/node_modules
|
|
# Use a separate cache for this from other JS jobs since we run the
|
|
# webpack steps and will have more to cache.
|
|
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-node_modules-
|
|
|
|
- name: Go Cache
|
|
id: go-cache
|
|
uses: actions/cache@661fd3eb7f2f20d8c7c84bc2b0509efd7a826628 # v2
|
|
with:
|
|
# In order:
|
|
# * Module download cache
|
|
# * Build cache (Linux)
|
|
# * Build cache (Mac)
|
|
# * Build cache (Windows)
|
|
path: |
|
|
~/go/pkg/mod
|
|
~/.cache/go-build
|
|
~/Library/Caches/go-build
|
|
%LocalAppData%\go-build
|
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-go-
|
|
|
|
- name: Install JS Dependencies
|
|
if: steps.js-cache.outputs.cache-hit != 'true'
|
|
run: make deps-js
|
|
|
|
- name: Install Go Dependencies
|
|
if: steps.go-cache.outputs.cache-hit != 'true'
|
|
run: make deps-go
|
|
|
|
- name: Generate static files
|
|
run: |
|
|
export PATH=$PATH:~/go/bin
|
|
make generate
|
|
|
|
- name: Build binaries
|
|
run: make
|
|
|
|
- uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2 # v2
|
|
with:
|
|
name: build
|
|
path: build/ |