Update blank.yml

This commit is contained in:
Sliverkiss
2024-02-20 23:11:41 +08:00
committed by GitHub
parent 85f512ce32
commit 8f4eba3a5d

View File

@@ -39,27 +39,12 @@ jobs:
name: json-artifact name: json-artifact
path: ${{ github.workspace }}/sliverkiss.icons.json path: ${{ github.workspace }}/sliverkiss.icons.json
- name: Check for changes - name: Push to QuantumultX Repository
id: check_changes
run: | run: |
if [ -z "$(git status --porcelain)" ]; then git config user.name "${{ github.actor }}"
echo "未监测到变动,跳过提交" git config user.email "${{ github.actor }}@users.noreply.github.com"
else git add .
echo "::set-output name=changes_exist::true" git commit -m "自动更新图标仓库"
echo "已监测到变动,执行下一步骤" git push origin HEAD:main
fi
- name: Commit and push if changes exist
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
git add .
if git diff --staged --quiet; then
echo "未监测到变动,跳过提交"
else
git commit -m "自动更新图标仓库""
git push origin HEAD:main
fi
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}