File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77
88permissions :
99 contents : write
10+ actions : read
11+
12+ concurrency :
13+ group : iptvfast-generate
14+ cancel-in-progress : false
1015
1116jobs :
1217 generate :
@@ -15,11 +20,13 @@ jobs:
1520 IPTVFAST_CONCURRENCY : " 32"
1621 IPTVFAST_TIMEOUT : " 25"
1722 IPTVFAST_RESOLVE_REDIRECTS : " true"
18- COMMIT_OUTPUTS : " false"
1923
2024 steps :
2125 - name : Checkout
2226 uses : actions/checkout@v4
27+ with :
28+ fetch-depth : 0
29+ persist-credentials : true
2330
2431 - name : Set up Python
2532 uses : actions/setup-python@v5
@@ -39,12 +46,20 @@ jobs:
3946 with :
4047 name : iptvfast-output
4148 path : output/
49+ if-no-files-found : error
50+ retention-days : 30
4251
43- - name : Commit generated files
44- if : env.COMMIT_OUTPUTS == 'true'
52+ - name : Commit generated files to repository
4553 run : |
46- git config user.name "github-actions"
47- git config user.email "github-actions@github.com"
54+ git config user.name "github-actions[bot]"
55+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
56+
4857 git add output/
49- git commit -m "Update IPTVFast generated playlists" || echo "No changes"
50- git push
58+
59+ if git diff --cached --quiet; then
60+ echo "No generated changes to commit."
61+ else
62+ git commit -m "Update generated IPTVFast playlists"
63+ git pull --rebase origin "${GITHUB_REF_NAME}"
64+ git push origin "HEAD:${GITHUB_REF_NAME}"
65+ fi
You can’t perform that action at this time.
0 commit comments