Skip to content

Commit 7277117

Browse files
authored
Update build.yml
1 parent 9c21bcb commit 7277117

1 file changed

Lines changed: 32 additions & 32 deletions

File tree

.github/workflows/build.yml

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ jobs:
4040
git clone https://github.com/LearningOS/rCore-Tutorial-Checker-2023A.git ci-user
4141
git clone https://github.com/LearningOS/rCore-Tutorial-Test-2023A.git ci-user/user
4242
ID=`git rev-parse --abbrev-ref HEAD | grep -oP 'ch\K[0-9]'`
43-
cd ci-user && make test CHAPTER=$ID passwd=${{ secrets.BASE_TEST_TOKEN }}
44-
# cd ci-user && make test CHAPTER=$ID passwd=${{ secrets.BASE_TEST_TOKEN }} > ../output.txt
45-
# cat ../output.txt
46-
# - name: end
47-
# id: end
48-
# run: |
49-
# cat output.txt | grep -a "Test passed" | grep -oP "\d{1,}/\d{1,}" | xargs -i echo "points={}"
50-
# cat output.txt | grep -a "Test passed" | grep -oP "\d{1,}/\d{1,}" | xargs -i echo "points={}" >> $GITHUB_OUTPUT
43+
# cd ci-user && make test CHAPTER=$ID passwd=${{ secrets.BASE_TEST_TOKEN }}
44+
cd ci-user && make test CHAPTER=$ID passwd=${{ secrets.BASE_TEST_TOKEN }} > ../output.txt
45+
cat ../output.txt
46+
- name: end
47+
id: end
48+
run: |
49+
cat output.txt | grep -a "Test passed" | grep -oP "\d{1,}/\d{1,}" | xargs -i echo "points={}"
50+
cat output.txt | grep -a "Test passed" | grep -oP "\d{1,}/\d{1,}" | xargs -i echo "points={}" >> $GITHUB_OUTPUT
5151
gitlab-mirror:
5252
if: github.repository == 'LearningOS/rCore-Tutorial-Code-2023A'
5353
runs-on: ubuntu-latest
@@ -63,27 +63,27 @@ jobs:
6363
GITLAB_PROJECT_NAME: "rcore-tutorial-code-2023a"
6464
GITLAB_PROJECT_TOKEN: ${{ secrets.GITLAB_PROJECT_TOKEN }}
6565
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66-
# deploy:
67-
# if: github.repository != 'LearningOS/rCore-Tutorial-Code-2023A'
68-
# name: Deploy to pages
69-
# needs: basic-test
70-
# runs-on: ubuntu-latest
71-
# permissions: write-all
72-
# steps:
73-
# - uses: actions/checkout@v3
74-
# continue-on-error: true
75-
# with:
76-
# ref: 'gh-pages'
77-
# - name: Save Log File
78-
# uses: yfblock/multi-rank-log@main
79-
# with:
80-
# public-dir: classroom
81-
# points: ${{ needs.basic-test.outputs.points }}
82-
# - name: GitHub Pages
83-
# uses: crazy-max/ghaction-github-pages@v3
84-
# with:
85-
# target_branch: gh-pages
86-
# build_dir: ./classroom
87-
# keep_history: true
88-
# env:
89-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66+
deploy:
67+
if: github.repository != 'LearningOS/rCore-Tutorial-Code-2023A'
68+
name: Deploy to pages
69+
needs: basic-test
70+
runs-on: ubuntu-latest
71+
permissions: write-all
72+
steps:
73+
- uses: actions/checkout@v3
74+
continue-on-error: true
75+
with:
76+
ref: 'gh-pages'
77+
- name: Save Log File
78+
uses: yfblock/multi-rank-log@main
79+
with:
80+
public-dir: classroom
81+
points: ${{ needs.basic-test.outputs.points }}
82+
- name: GitHub Pages
83+
uses: crazy-max/ghaction-github-pages@v3
84+
with:
85+
target_branch: gh-pages
86+
build_dir: ./classroom
87+
keep_history: true
88+
env:
89+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)