diff --git a/.github/workflows/main-drivers.yml b/.github/workflows/main-drivers.yml index 7e4c8e43f6..9253327607 100644 --- a/.github/workflows/main-drivers.yml +++ b/.github/workflows/main-drivers.yml @@ -5,6 +5,12 @@ on: branches: - master pull_request: + types: + - labeled + - unlabeled + - synchronize + - opened + - reopened jobs: init: @@ -52,7 +58,8 @@ jobs: public-support-packages-bucket: ${{ needs.init.outputs.public-support-packages-bucket }} if: | always() && - (github.event_name == 'push' && github.ref_name == 'master') + ((github.event_name == 'push' && github.ref_name == 'master') || + contains(github.event.pull_request.labels.*.name, 'test-support-packages')) needs: - init - build-drivers diff --git a/.github/workflows/support-packages.yml b/.github/workflows/support-packages.yml index be379b395c..017c4031f2 100644 --- a/.github/workflows/support-packages.yml +++ b/.github/workflows/support-packages.yml @@ -62,7 +62,7 @@ jobs: - name: Create support-packages run: | ${{ github.workspace }}/kernel-modules/support-packages/04-create-support-packages.sh \ - ${{ github.workspace }}/collector/LICENSE-kernel-modules.txt \ + ${{ github.workspace }}/collector/kernel-modules/LICENSE \ gs://${{ inputs.upstream-drivers-bucket }} \ /tmp/support-packages/metadata \ /tmp/support-packages/output \ diff --git a/kernel-modules/support-packages/04-create-support-packages.sh b/kernel-modules/support-packages/04-create-support-packages.sh index cf537e2d44..e9aaf872f1 100755 --- a/kernel-modules/support-packages/04-create-support-packages.sh +++ b/kernel-modules/support-packages/04-create-support-packages.sh @@ -42,6 +42,10 @@ mkdir -p "${OUT_DIR}" || die "Failed to create output directory '${OUT_DIR}'" for mod_ver_dir in "${MD_DIR}/module-versions"/*; do mod_ver="$(basename "$mod_ver_dir")" + if skip_version "$mod_ver"; then + continue + fi + package_root="$(mktemp -d)" probe_dir="${package_root}/kernel-modules/${mod_ver}" mkdir -p "$probe_dir" diff --git a/kernel-modules/support-packages/utils.sh b/kernel-modules/support-packages/utils.sh index 6d89858541..0666fd21b2 100644 --- a/kernel-modules/support-packages/utils.sh +++ b/kernel-modules/support-packages/utils.sh @@ -33,6 +33,10 @@ use_downstream_only() { _check_min_version "$1" "2.9.0" } +skip_version() { + _check_min_version "$1" "2.10.0" +} + bucket_has_drivers() { count=$(gsutil ls "$1" | wc -l)