-
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 f40a8d941847e9c6a6ca731428957053bbfc0233
- Loading branch information
0 parents
commit d20d609
Showing
23 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.