feat: update workflow
All checks were successful
build / build (push) Successful in 1m18s
build / triger-update-ci (push) Has been skipped
build / trigger-build-image (push) Has been skipped

This commit is contained in:
zzjc1234 2024-10-10 15:34:25 +08:00
parent 9755af1175
commit 7b75c2ab94

View File

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