alist_3.41.0 (#516) #269
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: iStore Upload | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths: | |
- 'bin/packages/**' | |
env: | |
SDK_NAME: openwrt-sdk-21.02.2-armvirt-64_gcc-8.4.0_musl.Linux-x86_64 | |
SDK_URL: https://downloads.openwrt.org/releases/21.02.2/targets/armvirt/64/ | |
TZ: Asia/Shanghai | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: iStore Upload | |
steps: | |
- name: Initialization environment | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
run: | | |
sudo swapoff /swapfile || true | |
sudo rm -rf /swapfile | |
sudo -E apt-get -qq install binutils bzip2 xz-utils unzip git wget rsync | |
sudo -E apt-get -qq autoremove --purge | |
sudo -E apt-get -qq clean | |
sudo timedatectl set-timezone "$TZ" | |
- uses: actions/create-github-app-token@v1 | |
id: app-token | |
with: | |
app-id: ${{ vars.BOT_APP_ID }} | |
private-key: ${{ secrets.BOT_PRIVATE_KEY }} | |
- name: Checkout | |
uses: actions/checkout@main | |
with: | |
token: ${{ steps.app-token.outputs.token }} | |
fetch-depth: 1 | |
- name: 'Restore SDK from cache' | |
id: sdk-cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ github.workspace }}/.sdk | |
key: ${{ env.SDK_NAME }} | |
- name: Download SDK | |
run: | | |
[ -d "${{ github.workspace }}/.sdk" ] || mkdir -p "${{ github.workspace }}/.sdk" | |
[ -s ${{ github.workspace }}/.sdk/${SDK_NAME}.tar.xz ] || wget -O ${{ github.workspace }}/.sdk/${SDK_NAME}.tar.xz ${SDK_URL}${SDK_NAME}.tar.xz | |
- name: Unpack SDK | |
run: tar --strip-components=1 -xJf ${{ github.workspace }}/.sdk/${SDK_NAME}.tar.xz | |
- name: Index ipks | |
run: ./repo/Index.sh | |
- name: Upload ipks | |
env: | |
RSYNC_PASSWORD: ${{ secrets.RSYNC_PASSWORD }} | |
REPO_DEST: ${{ secrets.RSYNC_DEST }} | |
run: ./repo/Upload.sh | |
- name: New Pending | |
run: git push -f origin HEAD:pending |