Skip to content

Commit ff0dd77

Browse files
committed
added devcontainer feature
1 parent 2759e8c commit ff0dd77

File tree

3 files changed

+70
-0
lines changed

3 files changed

+70
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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+
permissions:
10+
contents: write
11+
pull-requests: write
12+
packages: write
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: "Publish Features"
17+
uses: devcontainers/action@v1
18+
with:
19+
publish-features: "true"
20+
base-path-to-features: "./src"
21+
generate-docs: "true"
22+
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
26+
- name: Create PR for Documentation
27+
id: push_image_info
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
run: |
31+
set -e
32+
echo "Start."
33+
# Configure git and Push updates
34+
git config --global user.email github-actions[bot]@users.noreply.github.com
35+
git config --global user.name github-actions[bot]
36+
git config pull.rebase false
37+
branch=automated-documentation-update-$GITHUB_RUN_ID
38+
git checkout -b $branch
39+
message='Automated documentation update'
40+
# Add / update and commit
41+
git add */**/README.md
42+
git commit -m 'Automated documentation update [skip ci]' || export NO_UPDATES=true
43+
# Push
44+
if [ "$NO_UPDATES" != "true" ] ; then
45+
git push origin "$branch"
46+
gh pr create --title "$message" --body "$message"
47+
fi
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"id": "fexec",
3+
"version": "1.0.0",
4+
"name": "fexec",
5+
"documentationURL": "http://github.com/roboslone/go-framework/tree/main/src/fexec",
6+
"description": "fexec is a simple tool for running commands",
7+
"options": {
8+
"version": {
9+
"default": "latest",
10+
"description": "Select the version to install.",
11+
"proposals": [
12+
"latest"
13+
],
14+
"type": "string"
15+
}
16+
},
17+
"installsAfter": [
18+
"ghcr.io/devcontainers/features/go:1"
19+
]
20+
}

src/fexec/install.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
set -e
2+
3+
go install "github.com/roboslone/go-framework/cmd/fexec@$VERSION"

0 commit comments

Comments
 (0)