From 366ccbd3f6e51870f259a60bcc6f590343836dd9 Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Tue, 26 Dec 2023 19:57:19 +0800 Subject: [PATCH] CI: update dependencies Signed-off-by: Tianling Shen --- .github/workflows/multi-arch-build.yml | 20 +++++------------ scripts/generate_index.sh | 26 --------------------- scripts/ipkg-make-index.sh | 31 -------------------------- 3 files changed, 6 insertions(+), 71 deletions(-) delete mode 100755 scripts/generate_index.sh delete mode 100755 scripts/ipkg-make-index.sh diff --git a/.github/workflows/multi-arch-build.yml b/.github/workflows/multi-arch-build.yml index ff06657..3f2e836 100644 --- a/.github/workflows/multi-arch-build.yml +++ b/.github/workflows/multi-arch-build.yml @@ -72,30 +72,22 @@ jobs: runtime_test: true steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Build - uses: immortalwrt/gh-action-sdk@v4 + uses: immortalwrt/gh-action-sdk@v5 env: ARCH: ${{ matrix.arch }} FEEDNAME: v2raya_ci PACKAGES: ca-certificates v2fly-geodata v2ray-core xray-core v2raya luci-app-v2raya NO_REFRESH_CHECK: 1 - - - name: Generate metadata - env: - BUILD_ARCH: ${{ matrix.arch }} - DEBIAN_FRONTEND: noninteractive - USIGN_KEY: ${{ secrets.USIGN_KEY }} - run: | - sudo -H apt -qq install signify-openbsd - sudo -H chown -R runner:runner bin - ./scripts/generate_index.sh + INDEX: 1 + KEY_BUILD: ${{ secrets.USIGN_KEY }} - name: Upload feed - uses: Pendect/action-rsyncer@8e05ffa5c93e5d9c9b167796b26044d2c616b2b9 + uses: Pendect/action-rsyncer@9738db02560c333bf629a1533bd86ceda138e599 with: flags: '-ahvHP' options: '--delete' @@ -115,7 +107,7 @@ jobs: path: "*.ipk" - name: Release packages - uses: svenstaro/upload-release-action@7319e4733ec7a184d739a6f412c40ffc339b69c7 + uses: svenstaro/upload-release-action@v2 if: github.event_name == 'release' with: overwrite: true diff --git a/scripts/generate_index.sh b/scripts/generate_index.sh deleted file mode 100755 index aecd858..0000000 --- a/scripts/generate_index.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -# Copyright (C) 2021 Tianling Shen - -set -o pipefail - -TOPDIR="$PWD" -KEY_BUILD="$PWD/v2raya.sec" -echo -e "$USIGN_KEY" > "$KEY_BUILD" - -pushd "$PWD/bin/packages/$BUILD_ARCH/v2raya_ci" - -"$TOPDIR"/scripts/ipkg-make-index.sh . 2>&1 > "Packages.manifest" - -grep -vE "^(Maintainer|LicenseFiles|Source|SourceName|Require|SourceDateEpoch)" "Packages.manifest" > "Packages" -case "$(((64 + "$(stat -L -c%s "Packages")") % 128))" in - 110|111) - echo -e "\033[33mWARNING: Applying padding in Packages to workaround usign SHA-512 bug!\033[0m" - { echo ""; echo ""; } >> "Packages" - ;; -esac -gzip -9nc "Packages" > "Packages.gz" - -signify-openbsd -S -s "$KEY_BUILD" -m "Packages" -rm -f "$KEY_BUILD" - -popd diff --git a/scripts/ipkg-make-index.sh b/scripts/ipkg-make-index.sh deleted file mode 100755 index 8c65b2d..0000000 --- a/scripts/ipkg-make-index.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env bash -set -e - -pkg_dir=$1 - -if [ -z $pkg_dir ] || [ ! -d $pkg_dir ]; then - echo "Usage: ipkg-make-index " >&2 - exit 1 -fi - -empty=1 - -for pkg in `find $pkg_dir -name '*.ipk' | sort`; do - empty= - name="${pkg##*/}" - name="${name%%_*}" - [[ "$name" = "kernel" ]] && continue - [[ "$name" = "libc" ]] && continue - echo "Generating index for package $pkg" >&2 - file_size=$(stat -L -c%s $pkg) - sha256sum=$(sha256sum $pkg | awk '{print $1}') - # Take pains to make variable value sed-safe - sed_safe_pkg=`echo $pkg | sed -e 's/^\.\///g' -e 's/\\//\\\\\\//g'` - tar -xzOf $pkg ./control.tar.gz | tar xzOf - ./control | sed -e "s/^Description:/Filename: $sed_safe_pkg\\ -Size: $file_size\\ -SHA256sum: $sha256sum\\ -Description:/" - echo "" -done -[ -n "$empty" ] && echo -exit 0