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] 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