generated from falcosecurity/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 13
/
action.yml
50 lines (43 loc) · 1.34 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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 }} > ${{ runner.temp }}/kernels_${{ inputs.arch }}.json
- name: Validate json
shell: bash
working-directory: ${{ runner.temp }}
run: |
cat kernels_${{ inputs.arch }}.json | jq empty
- name: Set output
id: store-outputs
shell: bash
run: |
echo "json=${{ runner.temp }}/kernels_${{ inputs.arch }}.json" >> $GITHUB_OUTPUT