chore: focs.ji -> focs.gc
This commit is contained in:
parent
4d00f5a6b9
commit
555b5dbf6c
|
|
@ -19,8 +19,8 @@ jobs:
|
|||
echo "${{ secrets.DEPLOY_KEY }}" > ~/.ssh/id_ed25519.pub
|
||||
chmod 600 ~/.ssh/id_ed25519
|
||||
chmod 600 ~/.ssh/id_ed25519.pub
|
||||
ssh-keyscan -p 2222 focs.ji.sjtu.edu.cn >> ~/.ssh/known_hosts
|
||||
ssh -T git@focs.ji.sjtu.edu.cn -p 2222
|
||||
ssh-keyscan -p 2222 focs.gc.sjtu.edu.cn >> ~/.ssh/known_hosts
|
||||
ssh -T git@focs.gc.sjtu.edu.cn -p 2222
|
||||
# - name: Lint
|
||||
# run: make lint
|
||||
- name: Build
|
||||
|
|
@ -43,16 +43,16 @@ jobs:
|
|||
echo "${{ secrets.DEPLOY_KEY }}" > ~/.ssh/id_ed25519.pub
|
||||
chmod 600 ~/.ssh/id_ed25519
|
||||
chmod 600 ~/.ssh/id_ed25519.pub
|
||||
ssh-keyscan -p 2222 focs.ji.sjtu.edu.cn >> ~/.ssh/known_hosts
|
||||
ssh -T git@focs.ji.sjtu.edu.cn -p 2222
|
||||
ssh-keyscan -p 2222 focs.gc.sjtu.edu.cn >> ~/.ssh/known_hosts
|
||||
ssh -T git@focs.gc.sjtu.edu.cn -p 2222
|
||||
- name: Set up Git
|
||||
run: |
|
||||
git config --global user.name "bot-joj"
|
||||
git config --global user.email "bot-joj@focs.ji.sjtu.edu.cn"
|
||||
git config --global user.email "bot-joj@focs.gc.sjtu.edu.cn"
|
||||
- name: Clone, Commit and Push
|
||||
shell: bash
|
||||
run: |
|
||||
git clone ssh://git@focs.ji.sjtu.edu.cn:2222/JOJ/runner-images.git runner-images
|
||||
git clone ssh://git@focs.gc.sjtu.edu.cn:2222/JOJ/runner-images.git runner-images
|
||||
cd runner-images
|
||||
git submodule update --init --remote --force
|
||||
git add -A
|
||||
|
|
|
|||
|
|
@ -18,13 +18,13 @@ jobs:
|
|||
echo "${{ secrets.DEPLOY_KEY }}" > ~/.ssh/id_ed25519.pub
|
||||
chmod 600 ~/.ssh/id_ed25519
|
||||
chmod 600 ~/.ssh/id_ed25519.pub
|
||||
ssh-keyscan -p 2222 focs.ji.sjtu.edu.cn >> ~/.ssh/known_hosts
|
||||
ssh -T git@focs.ji.sjtu.edu.cn -p 2222
|
||||
ssh-keyscan -p 2222 focs.gc.sjtu.edu.cn >> ~/.ssh/known_hosts
|
||||
ssh -T git@focs.gc.sjtu.edu.cn -p 2222
|
||||
- name: Set up Git
|
||||
run: |
|
||||
git config --global user.name "bot-joj"
|
||||
git config --global user.email "bot-joj@focs.ji.sjtu.edu.cn"
|
||||
git remote set-url origin ssh://git@focs.ji.sjtu.edu.cn:2222/JOJ/JOJ3.git
|
||||
git config --global user.email "bot-joj@focs.gc.sjtu.edu.cn"
|
||||
git remote set-url origin ssh://git@focs.gc.sjtu.edu.cn:2222/JOJ/JOJ3.git
|
||||
- name: Git Submodule Update
|
||||
run: |
|
||||
git submodule init
|
||||
|
|
|
|||
38
.gitmodules
vendored
38
.gitmodules
vendored
|
|
@ -1,76 +1,76 @@
|
|||
[submodule "examples/diff/basic"]
|
||||
path = examples/diff/basic
|
||||
url = ssh://git@focs.ji.sjtu.edu.cn:2222/JOJ/JOJ3-examples.git
|
||||
url = ssh://git@focs.gc.sjtu.edu.cn:2222/JOJ/JOJ3-examples.git
|
||||
branch = diff/basic
|
||||
[submodule "examples/diff/complex"]
|
||||
path = examples/diff/complex
|
||||
url = ssh://git@focs.ji.sjtu.edu.cn:2222/JOJ/JOJ3-examples.git
|
||||
url = ssh://git@focs.gc.sjtu.edu.cn:2222/JOJ/JOJ3-examples.git
|
||||
branch = diff/complex
|
||||
[submodule "examples/compile/success"]
|
||||
path = examples/compile/success
|
||||
url = ssh://git@focs.ji.sjtu.edu.cn:2222/JOJ/JOJ3-examples.git
|
||||
url = ssh://git@focs.gc.sjtu.edu.cn:2222/JOJ/JOJ3-examples.git
|
||||
branch = compile/success
|
||||
[submodule "examples/compile/error"]
|
||||
path = examples/compile/error
|
||||
url = ssh://git@focs.ji.sjtu.edu.cn:2222/JOJ/JOJ3-examples.git
|
||||
url = ssh://git@focs.gc.sjtu.edu.cn:2222/JOJ/JOJ3-examples.git
|
||||
branch = compile/error
|
||||
[submodule "examples/sample/success"]
|
||||
path = examples/sample/success
|
||||
url = ssh://git@focs.ji.sjtu.edu.cn:2222/JOJ/JOJ3-examples.git
|
||||
url = ssh://git@focs.gc.sjtu.edu.cn:2222/JOJ/JOJ3-examples.git
|
||||
branch = sample/success
|
||||
[submodule "examples/sample/error"]
|
||||
path = examples/sample/error
|
||||
url = ssh://git@focs.ji.sjtu.edu.cn:2222/JOJ/JOJ3-examples.git
|
||||
url = ssh://git@focs.gc.sjtu.edu.cn:2222/JOJ/JOJ3-examples.git
|
||||
branch = sample/error
|
||||
[submodule "examples/keyword/cpplint/sillycode"]
|
||||
path = examples/keyword/cpplint/sillycode
|
||||
url = ssh://git@focs.ji.sjtu.edu.cn:2222/JOJ/JOJ3-examples.git
|
||||
url = ssh://git@focs.gc.sjtu.edu.cn:2222/JOJ/JOJ3-examples.git
|
||||
branch = keyword/cpplint/sillycode
|
||||
[submodule "examples/keyword/clangtidy/sillycode"]
|
||||
path = examples/keyword/clangtidy/sillycode
|
||||
url = ssh://git@focs.ji.sjtu.edu.cn:2222/JOJ/JOJ3-examples.git
|
||||
url = ssh://git@focs.gc.sjtu.edu.cn:2222/JOJ/JOJ3-examples.git
|
||||
branch = keyword/clangtidy/sillycode
|
||||
[submodule "examples/healthcheck/asciifile"]
|
||||
path = examples/healthcheck/asciifile
|
||||
url = ssh://git@focs.ji.sjtu.edu.cn:2222/JOJ/JOJ3-examples.git
|
||||
url = ssh://git@focs.gc.sjtu.edu.cn:2222/JOJ/JOJ3-examples.git
|
||||
branch = healthcheck/asciifile
|
||||
[submodule "examples/healthcheck/asciimsg"]
|
||||
path = examples/healthcheck/asciimsg
|
||||
url = ssh://git@focs.ji.sjtu.edu.cn:2222/JOJ/JOJ3-examples.git
|
||||
url = ssh://git@focs.gc.sjtu.edu.cn:2222/JOJ/JOJ3-examples.git
|
||||
branch = healthcheck/asciimsg
|
||||
[submodule "examples/healthcheck/forbiddenfile"]
|
||||
path = examples/healthcheck/forbiddenfile
|
||||
url = ssh://git@focs.ji.sjtu.edu.cn:2222/JOJ/JOJ3-examples.git
|
||||
url = ssh://git@focs.gc.sjtu.edu.cn:2222/JOJ/JOJ3-examples.git
|
||||
branch = healthcheck/forbiddenfile
|
||||
[submodule "examples/healthcheck/meta"]
|
||||
path = examples/healthcheck/meta
|
||||
url = ssh://git@focs.ji.sjtu.edu.cn:2222/JOJ/JOJ3-examples.git
|
||||
url = ssh://git@focs.gc.sjtu.edu.cn:2222/JOJ/JOJ3-examples.git
|
||||
branch = healthcheck/meta
|
||||
[submodule "examples/healthcheck/release"]
|
||||
path = examples/healthcheck/release
|
||||
url = ssh://git@focs.ji.sjtu.edu.cn:2222/JOJ/JOJ3-examples.git
|
||||
url = ssh://git@focs.gc.sjtu.edu.cn:2222/JOJ/JOJ3-examples.git
|
||||
branch = healthcheck/release
|
||||
[submodule "examples/healthcheck/reposize"]
|
||||
path = examples/healthcheck/reposize
|
||||
url = ssh://git@focs.ji.sjtu.edu.cn:2222/JOJ/JOJ3-examples.git
|
||||
url = ssh://git@focs.gc.sjtu.edu.cn:2222/JOJ/JOJ3-examples.git
|
||||
branch = healthcheck/reposize
|
||||
[submodule "examples/healthcheck/repoverify"]
|
||||
path = examples/healthcheck/repoverify
|
||||
url = ssh://git@focs.ji.sjtu.edu.cn:2222/JOJ/JOJ3-examples.git
|
||||
url = ssh://git@focs.gc.sjtu.edu.cn:2222/JOJ/JOJ3-examples.git
|
||||
branch = healthcheck/repoverify
|
||||
[submodule "examples/keyword/script"]
|
||||
path = examples/keyword/script
|
||||
url = ssh://git@focs.ji.sjtu.edu.cn:2222/JOJ/JOJ3-examples.git
|
||||
url = ssh://git@focs.gc.sjtu.edu.cn:2222/JOJ/JOJ3-examples.git
|
||||
branch = keyword/script
|
||||
[submodule "examples/cppcheck/simple"]
|
||||
path = examples/cppcheck/simple
|
||||
url = ssh://git@focs.ji.sjtu.edu.cn:2222/JOJ/JOJ3-examples.git
|
||||
url = ssh://git@focs.gc.sjtu.edu.cn:2222/JOJ/JOJ3-examples.git
|
||||
branch = cppcheck/simple
|
||||
[submodule "examples/cpplint/simple"]
|
||||
path = examples/cpplint/simple
|
||||
url = ssh://git@focs.ji.sjtu.edu.cn:2222/JOJ/JOJ3-examples.git
|
||||
url = ssh://git@focs.gc.sjtu.edu.cn:2222/JOJ/JOJ3-examples.git
|
||||
branch = cpplint/simple
|
||||
[submodule "examples/healthcheck/whitelistedchars-success"]
|
||||
path = examples/healthcheck/whitelistedchars-success
|
||||
url = ssh://git@focs.ji.sjtu.edu.cn:2222/JOJ/JOJ3-examples.git
|
||||
url = ssh://git@focs.gc.sjtu.edu.cn:2222/JOJ/JOJ3-examples.git
|
||||
branch = healthcheck/whitelistedchars-success
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
1. Clone this repo in a Linux computer. For Windows, use [WSL 2](https://learn.microsoft.com/en-us/windows/wsl/install).
|
||||
|
||||
```bash
|
||||
$ git clone ssh://git@focs.ji.sjtu.edu.cn:2222/JOJ/JOJ3.git
|
||||
$ git clone ssh://git@focs.gc.sjtu.edu.cn:2222/JOJ/JOJ3.git
|
||||
```
|
||||
|
||||
2. Install [Go](https://go.dev/doc/install). Also, make sure `make` and `git` are installed and all 3 programs are presented in `$PATH`.
|
||||
|
|
@ -85,7 +85,7 @@ pre-commit installed at .git/hooks/pre-commit
|
|||
|
||||
## Workflow
|
||||
|
||||
These steps are executed within [runner-images](https://focs.ji.sjtu.edu.cn/git/JOJ/runner-images), as specified in the YAML files under `.gitea/workflows` in student repositories. Our customized [`act_runner`](https://github.com/focs-gitea/act_runner) ensures that only labeled images controlled by administrators can be used. Furthermore, our private Docker registry requires authentication for pushing images, so only administrator-created images can be used to run `joj3`.
|
||||
These steps are executed within [runner-images](https://focs.gc.sjtu.edu.cn/git/JOJ/runner-images), as specified in the YAML files under `.gitea/workflows` in student repositories. Our customized [`act_runner`](https://github.com/focs-gitea/act_runner) ensures that only labeled images controlled by administrators can be used. Furthermore, our private Docker registry requires authentication for pushing images, so only administrator-created images can be used to run `joj3`.
|
||||
|
||||
Inside the container created by `act_runner`, we use `sudo -E -u tt` to elevate permissions and run `joj3` with environment variables provided by Gitea Actions. All sensitive files should be stored on the host machine under the `tt` user's directory and mounted into the runner (e.g., `/home/tt/.config`). Allowed mount directories are also limited in `act_runner` configuration. Since the default `student` user inside the container (created from runner-images) shares the same UID as the `student` user on the host, which does not have the permission to access `tt`'s files. This helps ensure data security.
|
||||
|
||||
|
|
|
|||
|
|
@ -93,24 +93,24 @@ func TestParseConventionalCommit(t *testing.T) {
|
|||
},
|
||||
{
|
||||
name: "Multi-line body",
|
||||
commit: "feat(h1/e2): group (#86)\n\nReviewed-on: https://focs.ji.sjtu.edu.cn/git/test/test/pulls/86\nReviewed-by: foo <foo@sjtu.edu.cn>\nReviewed-by: bar <bar@sjtu.edu.cn>\nReviewed-by: nobody <nobody@sjtu.edu.cn>\n",
|
||||
commit: "feat(h1/e2): group (#86)\n\nReviewed-on: https://focs.gc.sjtu.edu.cn/git/test/test/pulls/86\nReviewed-by: foo <foo@sjtu.edu.cn>\nReviewed-by: bar <bar@sjtu.edu.cn>\nReviewed-by: nobody <nobody@sjtu.edu.cn>\n",
|
||||
want: &ConventionalCommit{
|
||||
Type: "feat",
|
||||
Scope: "h1/e2",
|
||||
Description: "group (#86)",
|
||||
Body: "Reviewed-on: https://focs.ji.sjtu.edu.cn/git/test/test/pulls/86\nReviewed-by: foo <foo@sjtu.edu.cn>\nReviewed-by: bar <bar@sjtu.edu.cn>\nReviewed-by: nobody <nobody@sjtu.edu.cn>",
|
||||
Body: "Reviewed-on: https://focs.gc.sjtu.edu.cn/git/test/test/pulls/86\nReviewed-by: foo <foo@sjtu.edu.cn>\nReviewed-by: bar <bar@sjtu.edu.cn>\nReviewed-by: nobody <nobody@sjtu.edu.cn>",
|
||||
Footer: "",
|
||||
},
|
||||
wantErr: false,
|
||||
},
|
||||
{
|
||||
name: "Multi-line body with footer",
|
||||
commit: "feat(h1/e2): group (#86)\n\nReviewed-on: https://focs.ji.sjtu.edu.cn/git/test/test/pulls/86\nReviewed-by: foo <foo@sjtu.edu.cn>\nReviewed-by: bar <bar@sjtu.edu.cn>\nReviewed-by: nobody <nobody@sjtu.edu.cn>\n\nFooter here\n",
|
||||
commit: "feat(h1/e2): group (#86)\n\nReviewed-on: https://focs.gc.sjtu.edu.cn/git/test/test/pulls/86\nReviewed-by: foo <foo@sjtu.edu.cn>\nReviewed-by: bar <bar@sjtu.edu.cn>\nReviewed-by: nobody <nobody@sjtu.edu.cn>\n\nFooter here\n",
|
||||
want: &ConventionalCommit{
|
||||
Type: "feat",
|
||||
Scope: "h1/e2",
|
||||
Description: "group (#86)",
|
||||
Body: "Reviewed-on: https://focs.ji.sjtu.edu.cn/git/test/test/pulls/86\nReviewed-by: foo <foo@sjtu.edu.cn>\nReviewed-by: bar <bar@sjtu.edu.cn>\nReviewed-by: nobody <nobody@sjtu.edu.cn>",
|
||||
Body: "Reviewed-on: https://focs.gc.sjtu.edu.cn/git/test/test/pulls/86\nReviewed-by: foo <foo@sjtu.edu.cn>\nReviewed-by: bar <bar@sjtu.edu.cn>\nReviewed-by: nobody <nobody@sjtu.edu.cn>",
|
||||
Footer: "Footer here",
|
||||
},
|
||||
wantErr: false,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user