generated from falcosecurity/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new: added a composite action + documentation.
Signed-off-by: Federico Di Pierro <[email protected]>
- Loading branch information
Showing
4 changed files
with
92 additions
and
40 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
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
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
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,50 @@ | ||
name: 'kernel-crawler' | ||
description: 'A tool to crawl existing Linux kernel versions from multiple distros' | ||
|
||
inputs: | ||
arch: | ||
description: 'Architecture to run against. x86_64 or aarch64.' | ||
required: false | ||
default: 'x86_64' | ||
distro: | ||
description: 'Distro to run against. Defaults to all.' | ||
required: false | ||
default: '*' | ||
|
||
outputs: | ||
json: | ||
description: "Generated json" | ||
value: ${{ steps.store-outputs.outputs.json }} | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install deps | ||
shell: bash | ||
run: | | ||
sudo apt update -y | ||
sudo apt install -y --no-install-recommends python3 python3-pip python3-pygit2 jq | ||
- name: Install crawler | ||
shell: bash | ||
working-directory: ${{ github.action_path }} | ||
run: | | ||
pip3 install . | ||
- name: Run crawler | ||
shell: bash | ||
working-directory: ${{ github.action_path }} | ||
run: | | ||
kernel-crawler crawl --distro=${{ inputs.distro }} --arch=${{ inputs.arch }} > kernels_${{ inputs.arch }}.json | ||
- name: Validate json | ||
shell: bash | ||
working-directory: ${{ github.action_path }} | ||
run: | | ||
cat kernels_${{ inputs.arch }}.json | jq empty | ||
- name: Set output | ||
id: store-outputs | ||
shell: bash | ||
run: | | ||
echo "json=${{ github.action_path }}/kernels_${{ inputs.arch }}.json" >> $GITHUB_OUTPUT |