Skip to content

Commit 5129405

Browse files
committed
add option to install features
1 parent a766c25 commit 5129405

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,15 @@ For strict security guarantees, it's best practice to [pin](https://docs.github.
1717

1818
```yaml
1919
- name: Install deva
20-
uses: DataDog/datadog-agent-dev@9711e279d2c74ff301b24d2dc51822c9bc741f94
20+
uses: DataDog/datadog-agent-dev@a766c250d61f24777684624cb86fc956350bac10
2121
```
2222

2323
## Options
2424

2525
Name | Default | Description
2626
--- | --- | ---
2727
`version` | `latest` | The version of deva to install (e.g. `0.4.2`).
28+
`features` | | The space-separated list of features to install (e.g. `feat1 feat2`).
2829

2930
## External consumers
3031

action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ runs:
1818
shell: bash
1919
env:
2020
DEVA_INSTALL_VERSION: ${{ inputs.version }}
21+
DEVA_INSTALL_FEATURES: legacy-tasks

main.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ PURPLE="\033[1;35m"
1414
RESET="\033[0m"
1515
TARGET_PLATFORM=$(to_lowercase "${DEVA_INSTALL_PLATFORM:-${RUNNER_OS}}")
1616
TARGET_ARCH=$(to_lowercase "${DEVA_INSTALL_ARCH:-${RUNNER_ARCH}}")
17+
FEATURES="${DEVA_INSTALL_FEATURES:-}"
1718

1819
if [[ "${TARGET_PLATFORM}" == "windows" ]]; then
1920
SEP="\\"
@@ -89,3 +90,14 @@ elif [[ "${TARGET_PLATFORM}" == "macos" ]]; then
8990
else
9091
fallback_install_deva
9192
fi
93+
94+
if [[ -n "${FEATURES}" ]]; then
95+
echo -e "${PURPLE}Installing features: ${FEATURES}${RESET}"
96+
97+
ARGS=()
98+
for feature in $FEATURES; do
99+
ARGS+=("-f" "$feature")
100+
done
101+
102+
deva dep sync "${ARGS[@]}"
103+
fi

0 commit comments

Comments
 (0)