-
Notifications
You must be signed in to change notification settings - Fork 3
57 lines (47 loc) · 1.58 KB
/
release.yaml
File metadata and controls
57 lines (47 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Release dev container features & Generate Documentation
on:
workflow_dispatch:
permissions:
contents: write
pull-requests: write
packages: write
concurrency:
group: ${{ github.workflow }}
jobs:
deploy:
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Publish Features
uses: devcontainers/action@1082abd5d2bf3a11abccba70eef98df068277772 # v1.4.3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
base-path-to-features: "./src"
generate-docs: "true"
publish-features: "true"
- name: Create PR for Documentation
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Configure git
git config --global user.email github-actions[bot]@users.noreply.github.com
git config --global user.name github-actions[bot]
git config pull.rebase false
# Create branch
branch=automated-documentation-update-$GITHUB_RUN_ID
git checkout -b "$branch"
# Stage changes
git add src/*/README.md
# Commit
message="Automated documentation update"
has_updates=true
git commit -m "$message" || has_updates=false
# Push if there were changes
if [ "$has_updates" = "true" ]; then
git push origin "$branch"
gh pr create --title "$message" --body "$message"
fi
shell: bash