Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new(ci): add dependabot for github actons. #86

Merged
merged 6 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 10
groups:
actions:
update-types:
- "minor"
- "patch"
7 changes: 4 additions & 3 deletions .github/workflows/ansible-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ jobs:
name: Ansible Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0

- name: Run ansible-lint
uses: ansible/ansible-lint[email protected] # the latest version has a bug that does not run in online mode
uses: ansible/ansible-lint@44be233dbd6a8a6d8f3c5297c318ed4ed4644c32 # v24.10.0
with:
path: "ansible-playbooks/"
working_directory: "${{ github.workspace }}/ansible-playbooks"
requirements_file: "${{ github.workspace }}/requirements.yml"
6 changes: 3 additions & 3 deletions .github/workflows/reusable_build_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ jobs:
fail-fast: false
matrix:
arch: [amd64, arm64]
runs-on: ${{ (matrix.arch == 'arm64' && 'actuated-arm64-8cpu-16gb') || 'ubuntu-22.04' }}
runs-on: ${{ (matrix.arch == 'arm64' && 'oracle-aarch64-4cpu-16gb') || 'ubuntu-22.04' }}
steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Login to Github Packages
if: inputs.push
uses: docker/login-action@v1
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand Down
14 changes: 7 additions & 7 deletions ansible-playbooks/roles/scap_open/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@
rescue:
- name: Disable Modern Bpf support
ansible.builtin.set_fact:
modern_bpf_supported: false
scap_open_modern_bpf_supported: false
when: result.rc == 95

- name: Check Old Bpf Support
block:
- name: Enable old Bpf support
ansible.builtin.set_fact:
bpf_supported: true
when: ansible_kernel is version(bpf_minimum_kver[ansible_architecture],'>=')
scap_open_bpf_supported: true
when: ansible_kernel is version(scap_open_bpf_minimum_kver[ansible_architecture],'>=')

- name: Prepare the build directory
block:
Expand All @@ -50,7 +50,7 @@
-DUSE_BUNDLED_DEPS=ON
-DBUILD_LIBSCAP_MODERN_BPF=OFF
-DBUILD_LIBSCAP_GVISOR=OFF
-DBUILD_BPF={{ bpf_supported }}
-DBUILD_BPF={{ scap_open_bpf_supported }}
-DCREATE_TEST_TARGETS=OFF
..
chdir: "{{ remote_repos_folder }}/repos/{{ repos['libs'].name }}/build"
Expand Down Expand Up @@ -139,7 +139,7 @@
cmd: make bpf -j {{ cpus }}
chdir: "{{ remote_repos_folder }}/repos/{{ repos['libs'].name }}/build"
register: bpf_probe_result
when: bpf_supported
when: scap_open_bpf_supported
changed_when: false
rescue:
- name: Print error message to stdout --- build bpf probe
Expand All @@ -161,7 +161,7 @@
cmd: /tmp/scap-open --num_events 50 --bpf driver/bpf/probe.o
chdir: "{{ remote_repos_folder }}/repos/{{ repos['libs'].name }}/build"
register: result
when: bpf_supported
when: scap_open_bpf_supported
changed_when: false
rescue:
- name: Print error message to stdout --- scap-open + bpf probe
Expand All @@ -183,7 +183,7 @@
cmd: /tmp/scap-open --num_events 50 --modern_bpf
chdir: "{{ remote_repos_folder }}/repos/{{ repos['libs'].name }}/build"
register: result
when: modern_bpf_supported
when: scap_open_modern_bpf_supported
changed_when: false
rescue:
- name: Print error message to stdout --- scap-open + modern probe
Expand Down
6 changes: 3 additions & 3 deletions ansible-playbooks/roles/scap_open/vars/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
modern_bpf_supported: true
bpf_supported: false
bpf_minimum_kver:
scap_open_modern_bpf_supported: true
scap_open_bpf_supported: false
scap_open_bpf_minimum_kver:
aarch64: '4.17'
x86_64: '4.14'
1 change: 1 addition & 0 deletions requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
collections:
- name: community.docker
- name: community.crypto
- name: ansible.posix