fix: 调整 Github 工具

This commit is contained in:
邹景立 2024-08-07 23:15:41 +08:00
parent 21df7baea4
commit 5bc95b7a8a
5 changed files with 6 additions and 11 deletions

View File

@ -15,7 +15,6 @@ def main():
owner = os.getenv("GITHUB_REPOSITORY").split('/')[0] # 获取仓库所有者 owner = os.getenv("GITHUB_REPOSITORY").split('/')[0] # 获取仓库所有者
g = Github(token) g = Github(token)
repo = g.get_repo(f"{owner}/{repo_name}") repo = g.get_repo(f"{owner}/{repo_name}")
delete_all_releases(repo) delete_all_releases(repo)
if __name__ == "__main__": if __name__ == "__main__":

6
.github/release.sh vendored
View File

@ -11,12 +11,6 @@ CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
VERSION=$1 VERSION=$1
BASEPATH=$(cd `dirname $0`; cd ../plugin/; pwd) BASEPATH=$(cd `dirname $0`; cd ../plugin/; pwd)
# Always prepend with "v"
#if [[ $VERSION != v* ]]
#then
# VERSION="v$VERSION"
#fi
if [ -z $2 ] ; then if [ -z $2 ] ; then
repos=$(ls $BASEPATH) repos=$(ls $BASEPATH)
else else

View File

@ -1,4 +1,4 @@
name: Clear Release name: Clear Releases
on: on:
workflow_dispatch: workflow_dispatch:
@ -20,6 +20,6 @@ jobs:
- name: Delete tags and releases - name: Delete tags and releases
env: env:
GITHUB_TOKEN: ${{ secrets.TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: | run: |
python .github/clear-releases.py python .github/clear-github-releases.py

View File

@ -1,4 +1,4 @@
name: Split Repos name: Split Repositorys
on: [ workflow_dispatch ] on: [ workflow_dispatch ]
@ -13,12 +13,14 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Setup Private Key - name: Setup Private Key
run: | run: |
mkdir -p ~/.ssh mkdir -p ~/.ssh
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa chmod 600 ~/.ssh/id_rsa
echo "StrictHostKeyChecking no" >> ~/.ssh/config echo "StrictHostKeyChecking no" >> ~/.ssh/config
- name: Split And Push - name: Split And Push
run: | run: |
git config pull.rebase true git config pull.rebase true