From 9a523c94d591a7013debbae0de339ca6b974f94f Mon Sep 17 00:00:00 2001 From: zzjc1234 <2359047351@qq.com> Date: Thu, 10 Oct 2024 12:28:16 +0800 Subject: [PATCH 01/21] feat: update workflow --- .gitea/workflows/build.yaml | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 2b927f1..4e53065 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -7,7 +7,7 @@ on: jobs: build: container: - image: focs.ji.sjtu.edu.cn:5000/gitea/runner-images:ubuntu-latest + image: focs.ji.sjtu.edu.cn:5000/gitea/runner-images:ci-test volumes: - /home/actions/.ssh:/root/.ssh steps: @@ -15,28 +15,33 @@ jobs: uses: https://gitea.com/BoYanZh/checkout@focs - name: Setup Go 1.23.1 run: | - wget -q https://studygolang.com/dl/golang/go1.23.2.linux-amd64.tar.gz - rm -rf /usr/local/go - tar -C /usr/local -xzf go1.23.2.linux-amd64.tar.gz - rm -rf go1.23.2.linux-amd64.tar.gz echo "PATH=$PATH:/usr/local/go/bin:/root/go/bin" >> $GITHUB_ENV - name: Display Go version run: go version - name: Prepare run: | - go env -w GO111MODULE=on - go env -w GOPROXY=https://goproxy.io,direct chown -R root:root /root/.ssh - - name: Setup golangci-lint - run: | - wget -q https://ghp.ci/https://github.com/golangci/golangci-lint/releases/download/v1.61.0/golangci-lint-1.61.0-linux-amd64.tar.gz - tar -C /tmp -xzf golangci-lint-1.61.0-linux-amd64.tar.gz - rm -rf golangci-lint-1.61.0-linux-amd64.tar.gz - mkdir -p /root/go/bin - mv /tmp/golangci-lint-1.61.0-linux-amd64/golangci-lint /root/go/bin - name: Setup Joint-Teapot run: | - pip install git+https://ghp.ci/https://github.com/BoYanZh/Joint-Teapot + if [ -f master_hash.txt ]; then + local_hash=$(cat master_hash.txt) + else + local_hash="" + fi + + remote_hash=$(git ls-remote https://github.com/BoYanZh/Joint-Teapot | grep master | awk '{print $1}') + + echo "Local hash: $local_hash" + echo "Remote hash: $remote_hash" + + if [ "$local_hash" != "$remote_hash" ]; then + echo "Hashes are different, updating Joint-Teapot..." + pip install git+https://mirror.ghproxy.com/https://github.com/BoYanZh/Joint-Teapot + + echo "$remote_hash" > master_hash.txt + else + echo "Hashes are the same, no update required." + fi - name: Lint run: make lint - name: Build -- 2.30.2 From 89f417177f423bb967d557e3ffba0b94961b8ccf Mon Sep 17 00:00:00 2001 From: zzjc1234 <2359047351@qq.com> Date: Thu, 10 Oct 2024 12:59:24 +0800 Subject: [PATCH 02/21] feat: update workflow --- .gitea/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 4e53065..7d8ede2 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -29,7 +29,7 @@ jobs: local_hash="" fi - remote_hash=$(git ls-remote https://github.com/BoYanZh/Joint-Teapot | grep master | awk '{print $1}') + remote_hash=$(git ls-remote https://mirror.ghproxy.com/https://github.com/BoYanZh/Joint-Teapot | grep master | awk '{print $1}') echo "Local hash: $local_hash" echo "Remote hash: $remote_hash" -- 2.30.2 From e7bd289320bb02aff39b907e359b656e53422742 Mon Sep 17 00:00:00 2001 From: zzjc1234 <2359047351@qq.com> Date: Thu, 10 Oct 2024 13:02:31 +0800 Subject: [PATCH 03/21] feat: update workflow --- .gitea/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 7d8ede2..0d2203c 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -23,8 +23,8 @@ jobs: chown -R root:root /root/.ssh - name: Setup Joint-Teapot run: | - if [ -f master_hash.txt ]; then - local_hash=$(cat master_hash.txt) + if [ -f /master_hash.txt ]; then + local_hash=$(cat /master_hash.txt) else local_hash="" fi -- 2.30.2 From 9755af11759d564eaa17a2873854c68e4d4b9677 Mon Sep 17 00:00:00 2001 From: zzjc1234 <2359047351@qq.com> Date: Thu, 10 Oct 2024 13:07:42 +0800 Subject: [PATCH 04/21] feat: update workflow --- .gitea/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 0d2203c..6f86020 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -29,14 +29,14 @@ jobs: local_hash="" fi - remote_hash=$(git ls-remote https://mirror.ghproxy.com/https://github.com/BoYanZh/Joint-Teapot | grep master | awk '{print $1}') + remote_hash=$(git ls-remote https://ghp.ci/https://github.com/BoYanZh/Joint-Teapot | grep master | awk '{print $1}') echo "Local hash: $local_hash" echo "Remote hash: $remote_hash" if [ "$local_hash" != "$remote_hash" ]; then echo "Hashes are different, updating Joint-Teapot..." - pip install git+https://mirror.ghproxy.com/https://github.com/BoYanZh/Joint-Teapot + pip install git+https://ghp.ci/https://github.com/BoYanZh/Joint-Teapot echo "$remote_hash" > master_hash.txt else -- 2.30.2 From 7b75c2ab947fdd4ba7f50f9d6e32177c91a01997 Mon Sep 17 00:00:00 2001 From: zzjc1234 <2359047351@qq.com> Date: Thu, 10 Oct 2024 15:34:25 +0800 Subject: [PATCH 05/21] feat: update workflow --- .gitea/workflows/build.yaml | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 6f86020..b56167e 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -38,9 +38,10 @@ jobs: echo "Hashes are different, updating Joint-Teapot..." pip install git+https://ghp.ci/https://github.com/BoYanZh/Joint-Teapot - echo "$remote_hash" > master_hash.txt + echo "hashes_match=false" >> $GITHUB_ENV else echo "Hashes are the same, no update required." + echo "hashes_match=true" >> $GITHUB_ENV fi - name: Lint run: make lint @@ -78,3 +79,24 @@ jobs: git commit --allow-empty -m "chore: trigger gitea actions by JOJ3" fi git push + triger-update-ci: + container: + image: focs.ji.sjtu.edu.cn:5000/gitea/runner-images:ubuntu-latest + volumes: + - /home/actions/.ssh:/root/.ssh + needs: build + if: env.hashes_match == 'true' + steps: + - name: Set up Git + run: | + git config --global user.name "gitea-actions[bot]" + git config --global user.email "gitea-actions[bot]@users.noreply.gitea.com" + chown -R root:root /root/.ssh + - name: Clone, Commit and Push + shell: bash + run: | + git clone ssh://git@focs.ji.sjtu.edu.cn:2222/JOJ/runner-images.git runner-images + cd runner-images + git checkout ci-test + make image + make push -- 2.30.2 From 6282b7b40874256a2e126cafe932eecb6edaec52 Mon Sep 17 00:00:00 2001 From: zzjc1234 <2359047351@qq.com> Date: Thu, 10 Oct 2024 15:37:05 +0800 Subject: [PATCH 06/21] feat: update workflow --- .gitea/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index b56167e..978c98d 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -85,7 +85,7 @@ jobs: volumes: - /home/actions/.ssh:/root/.ssh needs: build - if: env.hashes_match == 'true' + if: env.hashes_match == 'false' steps: - name: Set up Git run: | -- 2.30.2 From d6650f8bddd3f903230d9484971c982b5e2c2f54 Mon Sep 17 00:00:00 2001 From: zzjc1234 <2359047351@qq.com> Date: Thu, 10 Oct 2024 15:43:39 +0800 Subject: [PATCH 07/21] feat: update workflow --- .gitea/workflows/build.yaml | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 978c98d..dba00de 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -11,13 +11,13 @@ jobs: volumes: - /home/actions/.ssh:/root/.ssh steps: - - name: Check out repository code - uses: https://gitea.com/BoYanZh/checkout@focs - - name: Setup Go 1.23.1 - run: | - echo "PATH=$PATH:/usr/local/go/bin:/root/go/bin" >> $GITHUB_ENV - - name: Display Go version - run: go version + # - name: Check out repository code + # uses: https://gitea.com/BoYanZh/checkout@focs + # - name: Setup Go 1.23.1 + # run: | + # echo "PATH=$PATH:/usr/local/go/bin:/root/go/bin" >> $GITHUB_ENV + # - name: Display Go version + # run: go version - name: Prepare run: | chown -R root:root /root/.ssh @@ -43,16 +43,16 @@ jobs: echo "Hashes are the same, no update required." echo "hashes_match=true" >> $GITHUB_ENV fi - - name: Lint - run: make lint - - name: Build - run: make build - - name: Version - run: ./build/joj3 -version - - name: Test - run: | - make prepare-test - make ci-test + # - name: Lint + # run: make lint + # - name: Build + # run: make build + # - name: Version + # run: ./build/joj3 -version + # - name: Test + # run: | + # make prepare-test + # make ci-test trigger-build-image: container: image: focs.ji.sjtu.edu.cn:5000/gitea/runner-images:ubuntu-latest @@ -85,7 +85,7 @@ jobs: volumes: - /home/actions/.ssh:/root/.ssh needs: build - if: env.hashes_match == 'false' + if: github.env.hashes_match == 'false' steps: - name: Set up Git run: | -- 2.30.2 From fff4c0d23daf5b6fc9d89b5a1ef2c11a36ef1738 Mon Sep 17 00:00:00 2001 From: zzjc1234 <2359047351@qq.com> Date: Thu, 10 Oct 2024 16:00:49 +0800 Subject: [PATCH 08/21] feat: update workflow --- .gitea/workflows/build.yaml | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index dba00de..74cfa15 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -37,11 +37,8 @@ jobs: if [ "$local_hash" != "$remote_hash" ]; then echo "Hashes are different, updating Joint-Teapot..." pip install git+https://ghp.ci/https://github.com/BoYanZh/Joint-Teapot - - echo "hashes_match=false" >> $GITHUB_ENV else echo "Hashes are the same, no update required." - echo "hashes_match=true" >> $GITHUB_ENV fi # - name: Lint # run: make lint @@ -81,12 +78,31 @@ jobs: git push triger-update-ci: container: - image: focs.ji.sjtu.edu.cn:5000/gitea/runner-images:ubuntu-latest + image: focs.ji.sjtu.edu.cn:5000/gitea/runner-images:ci-test volumes: - /home/actions/.ssh:/root/.ssh needs: build - if: github.env.hashes_match == 'false' steps: + - name: Check update + run: | + if [ -f /master_hash.txt ]; then + local_hash=$(cat /master_hash.txt) + else + local_hash="" + fi + + remote_hash=$(git ls-remote https://ghp.ci/https://github.com/BoYanZh/Joint-Teapot | grep master | awk '{print $1}') + + echo "Local hash: $local_hash" + echo "Remote hash: $remote_hash" + + if [ "$local_hash" != "$remote_hash" ]; then + echo "Hashes are different, updating Joint-Teapot..." + pip install git+https://ghp.ci/https://github.com/BoYanZh/Joint-Teapot + else + echo "Hashes are the same, no update required." + exit 0 + fi - name: Set up Git run: | git config --global user.name "gitea-actions[bot]" -- 2.30.2 From 9cc3d71cc4cc519b0590f203de0ca1564a5318ca Mon Sep 17 00:00:00 2001 From: zzjc1234 <2359047351@qq.com> Date: Thu, 10 Oct 2024 16:02:10 +0800 Subject: [PATCH 09/21] feat: update workflow --- .gitea/workflows/build.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 74cfa15..29ba5ee 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -98,7 +98,6 @@ jobs: if [ "$local_hash" != "$remote_hash" ]; then echo "Hashes are different, updating Joint-Teapot..." - pip install git+https://ghp.ci/https://github.com/BoYanZh/Joint-Teapot else echo "Hashes are the same, no update required." exit 0 @@ -114,5 +113,5 @@ jobs: git clone ssh://git@focs.ji.sjtu.edu.cn:2222/JOJ/runner-images.git runner-images cd runner-images git checkout ci-test - make image + make build make push -- 2.30.2 From 1a9c7736519308fb0db3a78bf80874c9cd22718d Mon Sep 17 00:00:00 2001 From: zzjc1234 <2359047351@qq.com> Date: Thu, 10 Oct 2024 16:09:14 +0800 Subject: [PATCH 10/21] feat: update workflow --- .gitea/workflows/build.yaml | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 29ba5ee..d149999 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -11,13 +11,13 @@ jobs: volumes: - /home/actions/.ssh:/root/.ssh steps: - # - name: Check out repository code - # uses: https://gitea.com/BoYanZh/checkout@focs - # - name: Setup Go 1.23.1 - # run: | - # echo "PATH=$PATH:/usr/local/go/bin:/root/go/bin" >> $GITHUB_ENV - # - name: Display Go version - # run: go version + - name: Check out repository code + uses: https://gitea.com/BoYanZh/checkout@focs + - name: Setup Go 1.23.1 + run: | + echo "PATH=$PATH:/usr/local/go/bin:/root/go/bin" >> $GITHUB_ENV + - name: Display Go version + run: go version - name: Prepare run: | chown -R root:root /root/.ssh @@ -40,16 +40,16 @@ jobs: else echo "Hashes are the same, no update required." fi - # - name: Lint - # run: make lint - # - name: Build - # run: make build - # - name: Version - # run: ./build/joj3 -version - # - name: Test - # run: | - # make prepare-test - # make ci-test + - name: Lint + run: make lint + - name: Build + run: make build + - name: Version + run: ./build/joj3 -version + - name: Test + run: | + make prepare-test + make ci-test trigger-build-image: container: image: focs.ji.sjtu.edu.cn:5000/gitea/runner-images:ubuntu-latest -- 2.30.2 From 809126242e32133b0f97b0ab54b69998b9b0b798 Mon Sep 17 00:00:00 2001 From: zzjc1234 <2359047351@qq.com> Date: Thu, 10 Oct 2024 16:16:00 +0800 Subject: [PATCH 11/21] feat: update workflow --- .gitea/workflows/build.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index d149999..262f7b4 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -98,17 +98,21 @@ jobs: if [ "$local_hash" != "$remote_hash" ]; then echo "Hashes are different, updating Joint-Teapot..." + echo "HASH_MATCH=true" >> $GITHUB_ENV else echo "Hashes are the same, no update required." - exit 0 + echo "HASH_MATCH=false" >> $GITHUB_ENV fi - name: Set up Git + if: env.HASH_MATCH==false run: | + echo env.HASH_MATCH git config --global user.name "gitea-actions[bot]" git config --global user.email "gitea-actions[bot]@users.noreply.gitea.com" chown -R root:root /root/.ssh - name: Clone, Commit and Push shell: bash + if: env.HASH_MATCH==false run: | git clone ssh://git@focs.ji.sjtu.edu.cn:2222/JOJ/runner-images.git runner-images cd runner-images -- 2.30.2 From af4113d4d72bb40101a03722dab13ceb6b55177f Mon Sep 17 00:00:00 2001 From: zzjc1234 <2359047351@qq.com> Date: Thu, 10 Oct 2024 16:17:00 +0800 Subject: [PATCH 12/21] feat: update workflow --- .gitea/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 262f7b4..13da0c9 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -81,7 +81,7 @@ jobs: image: focs.ji.sjtu.edu.cn:5000/gitea/runner-images:ci-test volumes: - /home/actions/.ssh:/root/.ssh - needs: build + # needs: build steps: - name: Check update run: | -- 2.30.2 From ebd214c6c66baa1f36ecab7482ea5edc24218ce7 Mon Sep 17 00:00:00 2001 From: zzjc1234 <2359047351@qq.com> Date: Thu, 10 Oct 2024 16:18:31 +0800 Subject: [PATCH 13/21] feat: update workflow --- .gitea/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 13da0c9..2a82ae9 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -103,10 +103,10 @@ jobs: echo "Hashes are the same, no update required." echo "HASH_MATCH=false" >> $GITHUB_ENV fi + echo env.HASH_MATCH - name: Set up Git if: env.HASH_MATCH==false run: | - echo env.HASH_MATCH git config --global user.name "gitea-actions[bot]" git config --global user.email "gitea-actions[bot]@users.noreply.gitea.com" chown -R root:root /root/.ssh -- 2.30.2 From 0cff0b577e42d95ce3df97ee3bcdd2c8a7a1627e Mon Sep 17 00:00:00 2001 From: zzjc1234 <2359047351@qq.com> Date: Thu, 10 Oct 2024 16:19:11 +0800 Subject: [PATCH 14/21] test: update workflow --- .gitea/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 2a82ae9..e3bf402 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -103,7 +103,7 @@ jobs: echo "Hashes are the same, no update required." echo "HASH_MATCH=false" >> $GITHUB_ENV fi - echo env.HASH_MATCH + echo ${env.HASH_MATCH} - name: Set up Git if: env.HASH_MATCH==false run: | -- 2.30.2 From 83a56933246e9c33d7d6d6b324c8c7a464abad24 Mon Sep 17 00:00:00 2001 From: zzjc1234 <2359047351@qq.com> Date: Thu, 10 Oct 2024 16:20:19 +0800 Subject: [PATCH 15/21] test: update workflow --- .gitea/workflows/build.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index e3bf402..a47fa40 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -103,9 +103,8 @@ jobs: echo "Hashes are the same, no update required." echo "HASH_MATCH=false" >> $GITHUB_ENV fi - echo ${env.HASH_MATCH} - name: Set up Git - if: env.HASH_MATCH==false + if: env.HASH_MATCH==true run: | git config --global user.name "gitea-actions[bot]" git config --global user.email "gitea-actions[bot]@users.noreply.gitea.com" -- 2.30.2 From 3c2ad49905e068f5e71d34fff60cc7aac92e06b5 Mon Sep 17 00:00:00 2001 From: zzjc1234 <2359047351@qq.com> Date: Thu, 10 Oct 2024 16:22:36 +0800 Subject: [PATCH 16/21] test: update workflow --- .gitea/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index a47fa40..ad8ab9d 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -104,14 +104,14 @@ jobs: echo "HASH_MATCH=false" >> $GITHUB_ENV fi - name: Set up Git - if: env.HASH_MATCH==true + if: HASH_MATCH==true run: | git config --global user.name "gitea-actions[bot]" git config --global user.email "gitea-actions[bot]@users.noreply.gitea.com" chown -R root:root /root/.ssh - name: Clone, Commit and Push shell: bash - if: env.HASH_MATCH==false + if: HASH_MATCH==false run: | git clone ssh://git@focs.ji.sjtu.edu.cn:2222/JOJ/runner-images.git runner-images cd runner-images -- 2.30.2 From 8f9569c8e98114a9e4029094204892cf236bc2b5 Mon Sep 17 00:00:00 2001 From: zzjc1234 <2359047351@qq.com> Date: Thu, 10 Oct 2024 16:25:10 +0800 Subject: [PATCH 17/21] test: update workflow --- .gitea/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index ad8ab9d..92a0697 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -108,7 +108,7 @@ jobs: run: | git config --global user.name "gitea-actions[bot]" git config --global user.email "gitea-actions[bot]@users.noreply.gitea.com" - chown -R root:root /root/.ssh + # chown -R root:root /root/.ssh - name: Clone, Commit and Push shell: bash if: HASH_MATCH==false -- 2.30.2 From f1d17c0d6d18962d9856df194b5e62849c5cb9c4 Mon Sep 17 00:00:00 2001 From: zzjc1234 <2359047351@qq.com> Date: Thu, 10 Oct 2024 16:27:29 +0800 Subject: [PATCH 18/21] test: update workflow --- .gitea/workflows/build.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 92a0697..a47fa40 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -104,14 +104,14 @@ jobs: echo "HASH_MATCH=false" >> $GITHUB_ENV fi - name: Set up Git - if: HASH_MATCH==true + if: env.HASH_MATCH==true run: | git config --global user.name "gitea-actions[bot]" git config --global user.email "gitea-actions[bot]@users.noreply.gitea.com" - # chown -R root:root /root/.ssh + chown -R root:root /root/.ssh - name: Clone, Commit and Push shell: bash - if: HASH_MATCH==false + if: env.HASH_MATCH==false run: | git clone ssh://git@focs.ji.sjtu.edu.cn:2222/JOJ/runner-images.git runner-images cd runner-images -- 2.30.2 From 69c0b30d078a9fcca14a837d0f57c6487cc505d1 Mon Sep 17 00:00:00 2001 From: zzjc1234 <2359047351@qq.com> Date: Thu, 10 Oct 2024 16:29:02 +0800 Subject: [PATCH 19/21] test: update workflow --- .gitea/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index a47fa40..775ce2b 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -104,14 +104,14 @@ jobs: echo "HASH_MATCH=false" >> $GITHUB_ENV fi - name: Set up Git - if: env.HASH_MATCH==true + if: env.HASH_MATCH == 'true' run: | git config --global user.name "gitea-actions[bot]" git config --global user.email "gitea-actions[bot]@users.noreply.gitea.com" chown -R root:root /root/.ssh - name: Clone, Commit and Push shell: bash - if: env.HASH_MATCH==false + if: env.HASH_MATCH== 'false' run: | git clone ssh://git@focs.ji.sjtu.edu.cn:2222/JOJ/runner-images.git runner-images cd runner-images -- 2.30.2 From 6cabf864c01c012295153696248ed1caa484734d Mon Sep 17 00:00:00 2001 From: zzjc1234 <2359047351@qq.com> Date: Thu, 10 Oct 2024 16:31:11 +0800 Subject: [PATCH 20/21] fix: github env --- .gitea/workflows/build.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 775ce2b..8352773 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -98,13 +98,13 @@ jobs: if [ "$local_hash" != "$remote_hash" ]; then echo "Hashes are different, updating Joint-Teapot..." - echo "HASH_MATCH=true" >> $GITHUB_ENV + echo "HASH_MATCH=false" >> $GITHUB_ENV else echo "Hashes are the same, no update required." - echo "HASH_MATCH=false" >> $GITHUB_ENV + echo "HASH_MATCH=true" >> $GITHUB_ENV fi - name: Set up Git - if: env.HASH_MATCH == 'true' + if: env.HASH_MATCH == 'false' run: | git config --global user.name "gitea-actions[bot]" git config --global user.email "gitea-actions[bot]@users.noreply.gitea.com" -- 2.30.2 From 7a684b77dd412d54cd40a1d0ba6d5cd4beb8fee3 Mon Sep 17 00:00:00 2001 From: zzjc1234 <2359047351@qq.com> Date: Thu, 10 Oct 2024 16:32:59 +0800 Subject: [PATCH 21/21] fix: update ci after build --- .gitea/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 8352773..139095e 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -81,7 +81,7 @@ jobs: image: focs.ji.sjtu.edu.cn:5000/gitea/runner-images:ci-test volumes: - /home/actions/.ssh:/root/.ssh - # needs: build + needs: build steps: - name: Check update run: | -- 2.30.2