This commit is contained in:
NianBroken
2024-02-13 13:50:11 +08:00 Unverified
parent 08d32845dd
commit df1330b0db
+4 -7
View File
@@ -47,13 +47,10 @@ jobs:
git remote add upstream https://github.com/NianBroken/ZFCheckScores.git git remote add upstream https://github.com/NianBroken/ZFCheckScores.git
git fetch upstream main git fetch upstream main
# 检查上游分支的 .github/workflows/main.yml 文件是否有更改 # 复制上游分支的`.github/workflows/main.yml`文件到当前仓库并覆盖
git diff --exit-code upstream/main -- .github/workflows/main.yml || { - name: Copy upstream workflow file
echo "Upstream main branch's .github/workflows/main.yml file has changed. Force pushing changes." run: |
git checkout upstream/main -- .github/workflows/main.yml cp -f upstream/main/.github/workflows/main.yml .github/workflows/main.yml
git add .github/workflows/main.yml
git commit -m "Update .github/workflows/main.yml from upstream"
}
# 创建一个备份目录,并将当前目录中的所有.txt文件复制到备份目录 # 创建一个备份目录,并将当前目录中的所有.txt文件复制到备份目录
- name: Backup local .txt files - name: Backup local .txt files