Skip to content

Commit

Permalink
fix: 修改配置
Browse files Browse the repository at this point in the history
  • Loading branch information
zoujingli committed Aug 4, 2024
1 parent 788ee21 commit c162cde
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/clear.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,8 @@ jobs:
- name: Install PyGithub
run: pip install PyGithub

- name: Delete all GitHub tags
- name: Delete tags and releases
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
run: |
# 获取所有 tag 的列表
TAGS=$(git ls-remote --tags origin | cut -f2 | cut -d'/' -f3)
# 循环遍历所有 tag 并删除
for TAG in $TAGS; do
curl -s -X DELETE "https://api.github.com/repos/${{ github.repository }}/git/refs/tags/$TAG" -H "Authorization: token ${{ secrets.TOKEN }}"
done
python .github/delete_tags_and_releases.py
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
# 如果没有倒数第二个标签,则输出为空字符串
if [[ -z "$SECOND_LATEST_TAG" ]]; then
echo "::set-output name=tag_cmd::"
echo "::set-output name=tag_cmd::-S master"
else
echo "::set-output name=tag_cmd::-S $SECOND_LATEST_TAG"
fi
Expand Down

0 comments on commit c162cde

Please sign in to comment.