Skip to content

Commit

Permalink
Add build & publish of agent binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
noboruma committed Nov 8, 2023
1 parent 42f7dc4 commit 4d33645
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/build-publish-binaries.yaml
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

0 comments on commit 4d33645

Please sign in to comment.