-
Notifications
You must be signed in to change notification settings - Fork 2
52 lines (44 loc) · 1.65 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Create DB
on:
workflow_dispatch:
jobs:
create_aur_repository:
runs-on: ubuntu-latest
container: archlinux:latest
steps:
- name: "Downloading"
run: |
pacman -Syu --needed aria2 base-devel --noconfirm
urls=$(curl https://github.com/JPratama7/arch-builder/releases/expanded_assets/temp -s|grep "/JPratama7/arch-builder/releases/download/temp/"|awk -F '"|"' '{print$2}')
for i in ${urls[*]}; do
pkg=$(echo $i|awk -F '/' '{print$7}')
echo Downloading $pkg
aria2c -x 16 -s 16 https://github.com/$i
done
- name: "Download Older database"
run: |
urls=$(curl https://github.com/JPratama7/arch-builder/releases/expanded_assets/latest -s | grep "/JPratama7/arch-builder/releases/download/latest/" | grep jp7-arch | awk -F '"|"' '{print$2}')
for i in ${urls[*]}; do
pkg=$(echo $i|awk -F '/' '{print$7}')
echo Downloading $pkg
aria2c -x 16 -s 16 https://github.com/$i
done
- name: creating database
run: |
repo-add jp7-arch.db.tar *.pkg.tar.zst
- name: upload files
uses: ncipollo/release-action@v1.14.0
with:
allowUpdates: true
replacesArtifacts: true
tag: "latest"
artifacts: "*.zst"
token: ${{ secrets.GITHUB_TOKEN }}
- name: upload database
uses: ncipollo/release-action@v1.14.0
with:
allowUpdates: true
replacesArtifacts: true
tag: "latest"
artifacts: "./jp7-arch.*"
token: ${{ secrets.GITHUB_TOKEN }}