Create DB #1797
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
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 }} |