diff --git a/.github/workflows/mirror.yaml b/.github/workflows/mirror.yaml deleted file mode 100644 index 4e2409b..0000000 --- a/.github/workflows/mirror.yaml +++ /dev/null @@ -1,27 +0,0 @@ -name: Mirroring - -# yamllint disable-line rule:truthy -on: - push: - branches: - - master - - dev - -jobs: - mirror_gitee: - name: Mirror to Gitee - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Push to Gitee - env: - SSH_KEY: ${{ secrets.GITEE_KEY }} - run: | - mkdir -p ~/.ssh - echo "${SSH_KEY}" > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - export GIT_SSH_COMMAND="ssh -o StrictHostKeyChecking=no -l git" - git remote add gitee git@gitee.com:shenxn/protonmail-bridge-docker.git - git push --tags --force --prune gitee "refs/remotes/origin/*:refs/heads/*" diff --git a/.github/workflows/update-check.yaml b/.github/workflows/update-check.yaml deleted file mode 100644 index f6b1960..0000000 --- a/.github/workflows/update-check.yaml +++ /dev/null @@ -1,24 +0,0 @@ -name: update check - -on: - push: - paths: - - .github/workflows/update-check.yaml - - update-check.py - pull_request: - paths: - - .github/workflows/update-check.yaml - - update-check.py - schedule: - - cron: '0 0 * * *' # runs everyday at midnight - -jobs: - check: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - token: ${{ secrets.PERSONAL_TOKEN }} - - name: Check Update - run: python3 update-check.py ${{ github.event_name == 'pull_request' }} diff --git a/update-check.py b/update-check.py deleted file mode 100644 index 19666d6..0000000 --- a/update-check.py +++ /dev/null @@ -1,37 +0,0 @@ -import requests, os, sys - -def git(command): - return os.system(f"git {command}") - - -release = requests.get("https://api.github.com/repos/protonmail/proton-bridge/releases/latest").json() -version = release['tag_name'] -deb = [asset for asset in release ['assets'] if asset['name'].endswith('.deb')][0]['browser_download_url'] - -print(f"Latest release is: {version}") - -with open("VERSION", 'w') as f: - f.write(version) - -with open("deb/PACKAGE", 'w') as f: - f.write(deb) - -git("config --local user.name 'GitHub Actions'") -git("config --local user.email 'actions@github.com'") - -git("add -A") - -if git("diff --cached --quiet") == 0: # Returns 0 if there are no changes - print("Version didn't change") - exit(0) - -git(f"commit -m 'Bump version to {version}'") -is_pull_request = sys.argv[1] == "true" - -if is_pull_request: - print("This is a pull request, skipping push step.") - exit(0) - -if git("push") != 0: - print("Git push failed!") - exit(1)