Skip to content

Commit 5e7224b

Browse files
committed
Create poetry featre
0 parents  commit 5e7224b

File tree

4 files changed

+95
-0
lines changed

4 files changed

+95
-0
lines changed

.github/workflows/release.yaml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: "Release dev container features & Generate Documentation"
2+
on:
3+
workflow_dispatch:
4+
5+
jobs:
6+
deploy:
7+
if: ${{ github.ref == 'refs/heads/main' }}
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
12+
- name: "Publish Features"
13+
uses: devcontainers/action@v1
14+
with:
15+
publish-features: "true"
16+
base-path-to-features: "./src"
17+
generate-docs: "true"
18+
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
22+
- name: Create PR for Documentation
23+
id: push_image_info
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
run: |
27+
set -e
28+
echo "Start."
29+
# Configure git and Push updates
30+
git config --global user.email [email protected]
31+
git config --global user.name github-actions
32+
git config pull.rebase false
33+
branch=automated-documentation-update-$GITHUB_RUN_ID
34+
git checkout -b $branch
35+
message='Automated documentation update'
36+
# Add / update and commit
37+
git add */**/README.md
38+
git commit -m 'Automated documentation update [skip ci]' || export NO_UPDATES=true
39+
# Push
40+
if [ "$NO_UPDATES" != "true" ] ; then
41+
git push origin "$branch"
42+
gh pr create --title "$message" --body "$message"
43+
fi

src/poetry/README.md

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
# Poetry (poetry)
3+
4+
A hello world feature
5+
6+
## Example Usage
7+
8+
```json
9+
"features": {
10+
"ghcr.io/radix-ai/dev-container-features/poetry:0": {}
11+
}
12+
```
13+
14+
## Options
15+
16+
| Options Id | Description | Type | Default Value |
17+
|-----|-----|-----|-----|
18+
| poetry_home | Path where poetry should be installed. | string | - |
19+
| poetry_version | Poetry version to install. | string | 1.2.0 |
20+
21+
22+
23+
---
24+
25+
_Note: This file was auto-generated from the [devcontainer-feature.json](https://github.com/radix-ai/dev-container-features/blob/main/src/poetry/devcontainer-feature.json). Add additional notes to a `NOTES.md`._

src/poetry/devcontainer-feature.json

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "Poetry",
3+
"id": "poetry",
4+
"version": "1.0.0",
5+
"description": "Installs poetry, using the official poetry installer.",
6+
"options": {
7+
"poetry_home": {
8+
"type": "string",
9+
"default": "",
10+
"description": "Path where poetry should be installed."
11+
},
12+
"poetry_version": {
13+
"type": "string",
14+
"default": "1.8.5",
15+
"description": "Poetry version to install."
16+
}
17+
}
18+
}

src/poetry/install.sh

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/sh
2+
set -e
3+
4+
# install curl
5+
apt-get update && apt-get install --no-install-recommends --yes curl
6+
7+
# Install poerty
8+
curl -sSL https://install.python-poetry.org | python3 -
9+
echo "Activating feature 'poetry'"

0 commit comments

Comments
 (0)