Skip to content

Commit 1b8087d

Browse files
committed
[CHANGE] Added releaqse workflow
1 parent 9ad3221 commit 1b8087d

File tree

3 files changed

+53
-3
lines changed

3 files changed

+53
-3
lines changed

.github/workflows/release.yaml

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

.github/workflows/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "CI - Test Features"
1+
name: "Test Features"
22
on:
33
push:
44
branches:

.github/workflows/validate.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "Validate devcontainer-feature.json files"
1+
name: "Validate features"
22
on:
33
workflow_dispatch:
44
pull_request:
@@ -9,7 +9,7 @@ jobs:
99
steps:
1010
- uses: actions/checkout@v4
1111

12-
- name: "Validate devcontainer-feature.json files"
12+
- name: "Validate feature definitions"
1313
uses: devcontainers/action@v1
1414
with:
1515
validate-only: "true"

0 commit comments

Comments
 (0)