* [LTP] [PATCH 1/1] github: Add action to update wiki
@ 2021-12-10 13:43 Petr Vorel
2021-12-10 13:45 ` Petr Vorel
0 siblings, 1 reply; 7+ messages in thread
From: Petr Vorel @ 2021-12-10 13:43 UTC (permalink / raw)
To: ltp; +Cc: Smitop
Suggested-by: Smitop <se@smitop.com>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
Hi,
I have custom script for updating wiki, but I got fed up by running it.
I thought it'd be done with git remote hooks, but they're not supported.
Then I got hint from Smitop (most of the code is actually from him,
thanks!).
Tested on my fork:
https://github.com/pevik/ltp/runs/4477321979?check_suite_focus=true
https://github.com/pevik/ltp/wiki/Test-Writing-Guidelines#0-special-paragraph-for-testing
Next could be uploading metadata HTML and PDF to http://linux-test-project.github.io/.
Kind regards,
Petr
.github/workflows/wiki-mirror.yml | 53 +++++++++++++++++++++++++++++++
1 file changed, 53 insertions(+)
create mode 100644 .github/workflows/wiki-mirror.yml
diff --git a/.github/workflows/wiki-mirror.yml b/.github/workflows/wiki-mirror.yml
new file mode 100644
index 000000000..44a3e9ed7
--- /dev/null
+++ b/.github/workflows/wiki-mirror.yml
@@ -0,0 +1,53 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) Linux Test Project, 2021
+
+name: "Mirror doc to wiki"
+
+on:
+ push:
+ branches:
+ - master
+ paths:
+ - 'doc/**'
+
+jobs:
+ mirror:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout LTP
+ uses: actions/checkout@v2
+ with:
+ path: ltp
+
+ - name: Checkout LTP wiki
+ uses: actions/checkout@v2
+ with:
+ repository: "linux-test-project/ltp.wiki"
+ path: ltp.wiki
+
+ - name: Copy files, push
+ run: |
+ git config --global user.email "actions@github.com"
+ git config --global user.name "Wiki mirror"
+
+ dir="$GITHUB_WORKSPACE/ltp/doc/"
+ cd $dir
+ commit=$(git log --pretty=format:"%h (\"%s\")" -1 .)
+
+ cd $GITHUB_WORKSPACE/ltp.wiki
+
+ # Don't forget to update this list, keep it sorted
+ cp -v $dir/c-test-api.txt C-Test-API.asciidoc
+ cp -v $dir/c-test-tutorial-simple.txt C-Test-Case-Tutorial.asciidoc
+ cp -v $dir/library-api-writing-guidelines.txt LTP-Library-API-Writing-Guidelines.asciidoc
+ cp -v $dir/maintainer-patch-review-checklist.txt Maintainer-Patch-Review-Checklist.asciidoc
+ cp -v $dir/network-c-api.txt C-Test-Network-API.asciidoc
+ cp -v $dir/shell-test-api.txt Shell-Test-API.asciidoc
+ cp -v $dir/supported-kernel-libc-versions.txt Supported-kernel,-libc,-toolchain-versions.asciidoc
+ cp -v $dir/test-writing-guidelines.txt Test-Writing-Guidelines.asciidoc
+ cp -v $dir/user-guide.txt User-Guidelines.asciidoc
+
+ git add .
+ # only commit if there are changes
+ git diff-index --quiet HEAD -- || git commit -m "Update to $commit" .
+ git push
--
2.34.1
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [LTP] [PATCH 1/1] github: Add action to update wiki
2021-12-10 13:43 [LTP] [PATCH 1/1] github: Add action to update wiki Petr Vorel
@ 2021-12-10 13:45 ` Petr Vorel
0 siblings, 0 replies; 7+ messages in thread
From: Petr Vorel @ 2021-12-10 13:45 UTC (permalink / raw)
To: ltp; +Cc: Smitop
Hi,
sorry for a duplicate.
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [LTP] [PATCH 1/1] github: Add action to update wiki
2021-12-15 9:15 ` Cyril Hrubis
@ 2021-12-15 9:20 ` Petr Vorel
0 siblings, 0 replies; 7+ messages in thread
From: Petr Vorel @ 2021-12-15 9:20 UTC (permalink / raw)
To: Cyril Hrubis; +Cc: ltp
> Hi!
> > I'll also update doc/maintainer-patch-review-checklist.txt
> > https://github.com/linux-test-project/ltp/wiki/Maintainer-Patch-Review-Checklist
> > See patch bellow if any wording needs to be changed, I forget to add it in the patch.
> > > > Next could be uploading metadata HTML and PDF to http://linux-test-project.github.io/.
> > > Yes please, that would be awesome!
> > I'll do that soon. Where do we want to 1) store HTML and PDF 2) show links to it?
> > We have 3 places and 3 git repositories
> > https://github.com/linux-test-project/linux-test-project.github.com
> I would just put it into this repository and put some links on the front
> page. I do not think that it should be put into wiki or somewhere else.
OK, makes sense.
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [LTP] [PATCH 1/1] github: Add action to update wiki
2021-12-15 7:42 ` Petr Vorel
@ 2021-12-15 9:15 ` Cyril Hrubis
2021-12-15 9:20 ` Petr Vorel
0 siblings, 1 reply; 7+ messages in thread
From: Cyril Hrubis @ 2021-12-15 9:15 UTC (permalink / raw)
To: Petr Vorel; +Cc: ltp
Hi!
> I'll also update doc/maintainer-patch-review-checklist.txt
> https://github.com/linux-test-project/ltp/wiki/Maintainer-Patch-Review-Checklist
> See patch bellow if any wording needs to be changed, I forget to add it in the patch.
>
> > > Next could be uploading metadata HTML and PDF to http://linux-test-project.github.io/.
>
> > Yes please, that would be awesome!
> I'll do that soon. Where do we want to 1) store HTML and PDF 2) show links to it?
> We have 3 places and 3 git repositories
> https://github.com/linux-test-project/linux-test-project.github.com
I would just put it into this repository and put some links on the front
page. I do not think that it should be put into wiki or somewhere else.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [LTP] [PATCH 1/1] github: Add action to update wiki
2021-12-10 11:49 ` Cyril Hrubis
@ 2021-12-15 7:42 ` Petr Vorel
2021-12-15 9:15 ` Cyril Hrubis
0 siblings, 1 reply; 7+ messages in thread
From: Petr Vorel @ 2021-12-15 7:42 UTC (permalink / raw)
To: Cyril Hrubis; +Cc: ltp
Hi Cyril,
> Hi!
> > Tested on my fork:
> > https://github.com/pevik/ltp/runs/4477321979?check_suite_focus=true
> > https://github.com/pevik/ltp/wiki/Test-Writing-Guidelines#0-special-paragraph-for-testing
> Looks good:
> Acked-by: Cyril Hrubis <chrubis@suse.cz>
Thanks, merged!
I'll also update doc/maintainer-patch-review-checklist.txt
https://github.com/linux-test-project/ltp/wiki/Maintainer-Patch-Review-Checklist
See patch bellow if any wording needs to be changed, I forget to add it in the patch.
> > Next could be uploading metadata HTML and PDF to http://linux-test-project.github.io/.
> Yes please, that would be awesome!
I'll do that soon. Where do we want to 1) store HTML and PDF 2) show links to it?
We have 3 places and 3 git repositories
https://github.com/linux-test-project/linux-test-project.github.com
https://github.com/linux-test-project/ltp.wiki.git
https://github.com/linux-test-project/ltp
Kind regards,
Petr
diff --git doc/maintainer-patch-review-checklist.txt doc/maintainer-patch-review-checklist.txt
index c7bb47810b..4e10dc514b 100644
--- doc/maintainer-patch-review-checklist.txt
+++ doc/maintainer-patch-review-checklist.txt
@@ -20,8 +20,9 @@ Commit messages should have
After patch is accepted or rejected, set correct state and archive in
https://patchwork.ozlabs.org/project/ltp/list/[LTP patchwork instance].
-Also update LTP WIKI (git URL https://github.com/linux-test-project/ltp.wiki.git)
-if touch `doc/*.txt`.
+Also update `.github/workflows/wiki-mirror.yml` script which mirrors
+`doc/*.txt` to LTP wiki (git URL https://github.com/linux-test-project/ltp.wiki.git)
+if new wiki page is added.
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [LTP] [PATCH 1/1] github: Add action to update wiki
2021-12-09 23:08 Petr Vorel
@ 2021-12-10 11:49 ` Cyril Hrubis
2021-12-15 7:42 ` Petr Vorel
0 siblings, 1 reply; 7+ messages in thread
From: Cyril Hrubis @ 2021-12-10 11:49 UTC (permalink / raw)
To: Petr Vorel; +Cc: Smitop, ltp
Hi!
> Tested on my fork:
> https://github.com/pevik/ltp/runs/4477321979?check_suite_focus=true
> https://github.com/pevik/ltp/wiki/Test-Writing-Guidelines#0-special-paragraph-for-testing
Looks good:
Acked-by: Cyril Hrubis <chrubis@suse.cz>
> Next could be uploading metadata HTML and PDF to http://linux-test-project.github.io/.
Yes please, that would be awesome!
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 7+ messages in thread
* [LTP] [PATCH 1/1] github: Add action to update wiki
@ 2021-12-09 23:08 Petr Vorel
2021-12-10 11:49 ` Cyril Hrubis
0 siblings, 1 reply; 7+ messages in thread
From: Petr Vorel @ 2021-12-09 23:08 UTC (permalink / raw)
To: ltp; +Cc: Smitop
Suggested-by: Smitop <se@smitop.com>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
Hi,
I have custom script for updating wiki, but I got fed up by running it.
I thought it'd be done with git remote hooks, but they're not supported.
Then I got hint from Smitop (most of the code is actually from him,
thanks!).
Tested on my fork:
https://github.com/pevik/ltp/runs/4477321979?check_suite_focus=true
https://github.com/pevik/ltp/wiki/Test-Writing-Guidelines#0-special-paragraph-for-testing
Next could be uploading metadata HTML and PDF to http://linux-test-project.github.io/.
Kind regards,
Petr
.github/workflows/wiki-mirror.yml | 53 +++++++++++++++++++++++++++++++
1 file changed, 53 insertions(+)
create mode 100644 .github/workflows/wiki-mirror.yml
diff --git a/.github/workflows/wiki-mirror.yml b/.github/workflows/wiki-mirror.yml
new file mode 100644
index 000000000..44a3e9ed7
--- /dev/null
+++ b/.github/workflows/wiki-mirror.yml
@@ -0,0 +1,53 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) Linux Test Project, 2021
+
+name: "Mirror doc to wiki"
+
+on:
+ push:
+ branches:
+ - master
+ paths:
+ - 'doc/**'
+
+jobs:
+ mirror:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout LTP
+ uses: actions/checkout@v2
+ with:
+ path: ltp
+
+ - name: Checkout LTP wiki
+ uses: actions/checkout@v2
+ with:
+ repository: "linux-test-project/ltp.wiki"
+ path: ltp.wiki
+
+ - name: Copy files, push
+ run: |
+ git config --global user.email "actions@github.com"
+ git config --global user.name "Wiki mirror"
+
+ dir="$GITHUB_WORKSPACE/ltp/doc/"
+ cd $dir
+ commit=$(git log --pretty=format:"%h (\"%s\")" -1 .)
+
+ cd $GITHUB_WORKSPACE/ltp.wiki
+
+ # Don't forget to update this list, keep it sorted
+ cp -v $dir/c-test-api.txt C-Test-API.asciidoc
+ cp -v $dir/c-test-tutorial-simple.txt C-Test-Case-Tutorial.asciidoc
+ cp -v $dir/library-api-writing-guidelines.txt LTP-Library-API-Writing-Guidelines.asciidoc
+ cp -v $dir/maintainer-patch-review-checklist.txt Maintainer-Patch-Review-Checklist.asciidoc
+ cp -v $dir/network-c-api.txt C-Test-Network-API.asciidoc
+ cp -v $dir/shell-test-api.txt Shell-Test-API.asciidoc
+ cp -v $dir/supported-kernel-libc-versions.txt Supported-kernel,-libc,-toolchain-versions.asciidoc
+ cp -v $dir/test-writing-guidelines.txt Test-Writing-Guidelines.asciidoc
+ cp -v $dir/user-guide.txt User-Guidelines.asciidoc
+
+ git add .
+ # only commit if there are changes
+ git diff-index --quiet HEAD -- || git commit -m "Update to $commit" .
+ git push
--
2.34.1
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-12-15 9:20 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-10 13:43 [LTP] [PATCH 1/1] github: Add action to update wiki Petr Vorel
2021-12-10 13:45 ` Petr Vorel
-- strict thread matches above, loose matches on Subject: below --
2021-12-09 23:08 Petr Vorel
2021-12-10 11:49 ` Cyril Hrubis
2021-12-15 7:42 ` Petr Vorel
2021-12-15 9:15 ` Cyril Hrubis
2021-12-15 9:20 ` Petr Vorel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.