-
Notifications
You must be signed in to change notification settings - Fork 584
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add build & publish of agent binaries
- Loading branch information
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Build & Publish agent binaries | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
ver: | ||
description: "Binaries Version" | ||
required: true | ||
type: string | ||
|
||
env: | ||
DF_BIN_VER: ${{ inputs.ver }} | ||
|
||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Build agent binaries | ||
run: | | ||
make agent | ||
- name: Extract agent binaries | ||
run: | | ||
mkdir -p /tmp/binaries/$DF_BIN_VER | ||
cd /tmp/binaries/$DF_BIN_VER | ||
id=$(docker create deepfenceio/deepfence_agent_ce:latest) | ||
docker cp $id:/home/deepfence/bin/secret-scanner - > secret-scanner | ||
docker cp $id:/usr/local/discovery/deepfence-discovery - > deepfence-discovery | ||
docker cp $id:/opt/td-agent-bit/bin/fluent-bit - > fluent-bit | ||
docker rm -v $id | ||
- name: Upload to S3 | ||
uses: shallwefootball/s3-upload-action@master | ||
id: S3 | ||
with: | ||
aws_key_id: ${{secrets.AWS_KEY_ID}} | ||
aws_secret_access_key: ${{secrets.AWS_SECRET_ACCESS_KEY}} | ||
aws_bucket: deepfence-tm-binaries | ||
source_dir: /tmp/binaries |