-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build 0839775172db1f55b4703d189e1aa7e8f3aed3f3
- Loading branch information
0 parents
commit 122ffca
Showing
24 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import requests | ||
import glob | ||
import os | ||
|
||
REPO = "recloudstream/cloudstream" | ||
LIMIT = 30 | ||
MARKERS = ['<!--begin table-->', '<!--end table-->'] | ||
|
||
r = requests.get(f"https://api.github.com/repos/{REPO}/commits?per_page={LIMIT}") | ||
commits = {} | ||
for commit in r.json(): | ||
short = commit['sha'][:7] | ||
commits[short] = commit | ||
|
||
for apk in glob.glob("*.apk"): | ||
sha, _ = apk.split(".") | ||
if sha not in commits.keys(): | ||
os.remove(apk) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Clean archive | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: "clean" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Run script | ||
run: | | ||
python3 .github/clean.py | ||
- name: Push archive | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Actions" | ||
git add . | ||
git commit --amend -m "Build $GITHUB_SHA" || exit 0 # do not error if nothing to commit | ||
git push --force |
Oops, something went wrong.