Skip to content

Commit 15db4bb

Browse files
authored
Update Release.yml
1 parent a769ccb commit 15db4bb

File tree

1 file changed

+27
-19
lines changed

1 file changed

+27
-19
lines changed

.github/workflows/Release.yml

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,56 @@
1-
name: Release
1+
name: Cluster Release
22

33
on:
44
schedule:
55
- cron: '0 0 * * *'
66
workflow_dispatch:
77

8+
env:
9+
REPO_COUNT: 2
10+
811
jobs:
912
build:
1013
runs-on: ubuntu-latest
14+
1115
steps:
12-
- name: Checkout repository
16+
- name: Checkout
1317
uses: actions/checkout@v4
1418

15-
- name: Setup Github Repository
19+
- name: Setup Git identity
1620
run: |
17-
git config --global user.email "polarisdp@gmail.com"
1821
git config --global user.name "dopaemon"
22+
git config --global user.email "polarisdp@gmail.com"
1923
20-
- name: Clone A1 Repository
24+
- name: Clone All Repositories
2125
run: |
22-
git clone --depth=1 https://github.com/CydiaBlock/package_debian_A1.git
26+
for i in $(seq 1 $REPO_COUNT); do
27+
git clone --depth=1 https://github.com/CydiaBlock/package_debian_A$i.git
28+
done
2329
24-
- name: Create Packages
30+
- name: Build Cluster Packages
2531
run: |
26-
dpkg-scanpackages -m . /dev/null >Packages
32+
> Packages
33+
for i in $(seq 1 $REPO_COUNT); do
34+
dpkg-scanpackages -m package_debian_A$i /dev/null >> Packages
35+
echo "" >> Packages
36+
done
2737
28-
- name: Format for Cluster Repo
38+
- name: Format and Clean Packages
2939
run: |
30-
sed -i 's|Filename: \./package_debian_A1|Filename: package_debian_A1|' Packages
40+
sed -i 's|Filename: \./package_debian_A[0-9]\+|Filename: package_debian_A|' Packages
41+
sed -i 's/!CydiaVn-//g' Packages
3142
32-
- name: Compress Packages.bz2
33-
run: |
34-
rm -rf Packages.bz2
35-
bzip2 -fks Packages
43+
- name: Compress
44+
run: bzip2 -fks Packages
3645

37-
- name: Packages Clean
38-
run: |
39-
rm -rf ./package_debian_*
46+
- name: Clean folders
47+
run: rm -rf package_debian_*
4048

4149
- name: Commit and push changes
4250
uses: devops-infra/action-commit-push@master
4351
with:
4452
github_token: ${{ secrets.GITHUB_TOKEN }}
45-
commit_message: "Repo: Repository Update"
53+
commit_message: "Cluster Repo Updated"
4654

4755
- name: Upload GitHub Pages artifact
4856
uses: actions/upload-pages-artifact@v3
@@ -60,7 +68,7 @@ jobs:
6068

6169
environment:
6270
name: github-pages
63-
url: ${\{ steps.deployment.outputs.page_url }}
71+
url: ${{ steps.deployment.outputs.page_url }}
6472

6573
steps:
6674
- name: Deploy to GitHub Pages

0 commit comments

Comments
 (0)