1.3 KiB
1.3 KiB
Linux Collect Dependencies
A small Gitea Action for collecting the non-system shared library dependencies required by a Linux executable.
The action uses ldd to recursively find dependencies and copies the required libraries into an artifact directory while skipping common Linux system libraries.
Usage
- name: Collect dependencies
uses: https://git.omgitsalexl.me/omgitsalexl/linux-collect-dependencies@v1.0.1
with:
executable: path/to/my-app
output: artifacts
Inputs
| Input | Required | Default | Description |
|---|---|---|---|
executable |
Yes | Path to the executable to inspect | |
output |
No | artifacts |
Directory where dependencies are copied |
The executable itself is not copied. Add it to the output directory separately if you want to package it with the collected libraries.
Requirements
The Linux runner must have bash, ldd, and standard GNU utilities available.
Example
- name: Copy executable
run: |
mkdir -p artifacts
cp .build/release/my-app artifacts/my-app
- name: Collect dependencies
uses: https://git.omgitsalexl.me/omgitsalexl/linux-collect-dependencies@v1.0.1
with:
executable: .build/release/my-app
The resulting artifacts directory can then be uploaded or packaged by the rest of your workflow.