Skip to content

Commit 7182123

Browse files
github-actions[bot]RadxaYuntian
authored andcommitted
chore: templates generated by RadxaOS-SDK/rsdk@58ec0e7.dirty
1 parent f4f6717 commit 7182123

File tree

20 files changed

+1256
-480
lines changed

20 files changed

+1256
-480
lines changed

.devcontainer/.devenv/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!.gitignore

.devcontainer/.direnv/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!.gitignore

.devcontainer/devcontainer.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"customizations": {
3+
"vscode": {
4+
"settings": {
5+
"terminal.integrated.defaultProfile.linux": "bash"
6+
},
7+
"extensions": [
8+
"mkhl.direnv",
9+
"github.vscode-github-actions",
10+
"grafana.vscode-jsonnet",
11+
"ms-vscode.makefile-tools",
12+
"vivaxy.vscode-conventional-commits"
13+
]
14+
}
15+
},
16+
"image": "mcr.microsoft.com/devcontainers/base:bookworm",
17+
"features": {
18+
"ghcr.io/devcontainers/features/nix:1": {
19+
"version": "latest",
20+
"packages": "cachix,direnv,devenv",
21+
"extraNixConfig": [
22+
"experimental-features = nix-command flakes",
23+
// Uncomment below to speed up container building in China
24+
// "substituters = https://mirrors.ustc.edu.cn/nix-channels/store https://devenv.cachix.org https://cache.nixos.org",
25+
"trusted-users = root vscode"
26+
]
27+
}
28+
},
29+
"mounts": [
30+
{
31+
"source": "${localWorkspaceFolder}/.devcontainer/.devenv",
32+
"target": "${containerWorkspaceFolder}/.devenv",
33+
"type": "bind"
34+
},
35+
{
36+
"source": "${localWorkspaceFolder}/.devcontainer/.direnv",
37+
"target": "${containerWorkspaceFolder}/.direnv",
38+
"type": "bind"
39+
}
40+
],
41+
"workspaceMount": "source=${localWorkspaceFolder}/..,target=/workspaces,type=bind,consistency=cached",
42+
"runArgs": [
43+
// https://github.com/moby/moby/issues/27195#issuecomment-1410745778
44+
"--ulimit", "nofile=1024:524288"
45+
],
46+
"overrideCommand": true,
47+
"updateContentCommand": "make devcontainer_setup"
48+
}

.devenv/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!.gitignore

.direnv/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!.gitignore

.envrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
source_url "https://raw.githubusercontent.com/cachix/devenv/d1f7b48e35e6dee421cfd0f51481d17f77586997/direnvrc" "sha256-YBzqskFZxmNb3kYVoKD9ZixoPXJh1C9ZvTLGFRkauZ0="
2+
3+
use devenv

.github/dependabot.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
updates:
2+
- directory: "/"
3+
package-ecosystem: "github-actions"
4+
schedule:
5+
interval: "daily"
6+
version: 2
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
jobs:
2+
check_pull_requests:
3+
name: "Check linked issues"
4+
permissions:
5+
issues: "write"
6+
pull-requests: "write"
7+
runs-on: "ubuntu-latest"
8+
steps:
9+
- name: "Check linked issues"
10+
uses: "nearform-actions/github-action-check-linked-issues@v1"
11+
name: "Check linked issues"
12+
"on":
13+
pull_request_target:
14+
types:
15+
- "opened"
16+
- "reopened"
17+
permissions: {}

.github/workflows/dependabot.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
jobs:
2+
dependabot:
3+
if: "github.actor == 'dependabot[bot]'"
4+
runs-on: "ubuntu-latest"
5+
steps:
6+
- id: "metadata"
7+
name: "Dependabot metadata"
8+
uses: "dependabot/fetch-metadata@v2"
9+
with:
10+
github-token: "${{ secrets.GITHUB_TOKEN }}"
11+
- env:
12+
GH_TOKEN: "${{secrets.GITHUB_TOKEN}}"
13+
PR_URL: "${{github.event.pull_request.html_url}}"
14+
name: "Approve a PR & Enable auto-merge for Dependabot PRs"
15+
run: |
16+
gh pr review --approve "$PR_URL"
17+
gh pr merge --auto --merge "$PR_URL"
18+
name: "Dependabot auto-merge"
19+
"on":
20+
pull_request: {}
21+
permissions:
22+
contents: "write"
23+
pull-requests: "write"

.github/workflows/docs.yaml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
concurrency:
2+
cancel-in-progress: true
3+
group: "${{ github.workflow }}-${{ github.ref }}"
4+
jobs:
5+
build-doc:
6+
permissions:
7+
id-token: "write"
8+
pages: "write"
9+
runs-on: "ubuntu-latest"
10+
steps:
11+
- name: "Checkout"
12+
uses: "actions/checkout@v5"
13+
with:
14+
fetch-depth: 0
15+
- name: "Install Nix"
16+
uses: "cachix/install-nix-action@v26"
17+
- name: "Use cachix"
18+
uses: "cachix/cachix-action@v14"
19+
with:
20+
name: "devenv"
21+
- name: "Install devenv.sh"
22+
run: "nix profile install nixpkgs#devenv"
23+
- name: "Build"
24+
run: |
25+
devenv shell mdbook build
26+
for po_lang in zh-CN
27+
do
28+
POT_CREATION_DATE=$(grep --max-count 1 '^"POT-Creation-Date:' po/$po_lang.po | sed -E 's/".*: (.*)\\n"/\1/')
29+
if [[ $POT_CREATION_DATE == "" ]]; then
30+
POT_CREATION_DATE=now
31+
fi
32+
echo "::group::Building $po_lang translation as of $POT_CREATION_DATE"
33+
rm -r docs/
34+
git restore --source "$(git rev-list -n 1 --before "$POT_CREATION_DATE" @)" docs/
35+
# Set language and adjust site URL. Clear the redirects
36+
# since they are in sync with the source files, not the
37+
# translation.
38+
MDBOOK_BOOK__LANGUAGE=$po_lang \
39+
MDBOOK_OUTPUT__HTML__SITE_URL=/radxa-overlays/$po_lang/ \
40+
MDBOOK_OUTPUT__HTML__REDIRECT='{}' \
41+
devenv shell mdbook build -d book/$po_lang
42+
mv book/$po_lang/html book/html/$po_lang
43+
echo "::endgroup::"
44+
done
45+
shell: "bash"
46+
- name: "Setup Pages"
47+
uses: "actions/configure-pages@v5"
48+
- name: "Upload artifact"
49+
uses: "actions/upload-pages-artifact@v4"
50+
with:
51+
path: "./book/html"
52+
- if: "github.event_name != 'pull_request'"
53+
name: "Deploy to GitHub Pages"
54+
uses: "actions/deploy-pages@v4"
55+
name: "Deploy documentation"
56+
"on":
57+
merge_group: {}
58+
pull_request:
59+
paths:
60+
- "docs/**"
61+
- "theme/**"
62+
- "po/**"
63+
- "book.toml"
64+
- ".github/workflows/docs.yaml"
65+
push:
66+
branches:
67+
- "main"
68+
paths:
69+
- "docs/**"
70+
- "theme/**"
71+
- "po/**"
72+
- "book.toml"
73+
- ".github/workflows/docs.yaml"
74+
workflow_dispatch: {}
75+
permissions: {}

0 commit comments

Comments
 (0)