Files
linux-collect-dependencies/README.md
T
2026-08-24 20:03:34 -07:00

45 lines
1.3 KiB
Markdown

# 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
```yaml
- 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
```yaml
- 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.