Skip to content

Commit

Permalink
优化工作流文件,修复空行和格式问题
Browse files Browse the repository at this point in the history
  • Loading branch information
wjz304 committed Dec 1, 2024
1 parent fb0d62f commit 64d807a
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/addons-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
cp -vf ${ROOT_PATH}/spk/package.tgz rr-addons/console/all/addons/console-$(echo ${MAKE_ARCH} | cut -d- -f2).tgz
rm -rf ${ROOT_PATH}/spk
fi
# build cross
docker run -v ${ROOT_PATH}/spksrc:/spksrc -w /spksrc/cross/powersched ghcr.io/synocommunity/spksrc make "arch-${MAKE_ARCH}"
docker run -v ${ROOT_PATH}/spksrc:/spksrc -w /spksrc/cross/synoscgiproxy ghcr.io/synocommunity/spksrc make "arch-${MAKE_ARCH}"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/buildroot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
sudo timedatectl set-timezone "Asia/Shanghai"
sudo apt update
sudo apt install -y locales busybox dialog gettext sed gawk jq curl
sudo apt install -y locales busybox dialog gettext sed gawk jq curl
sudo apt install -y python-is-python3 python3-pip libelf-dev qemu-utils cpio xz-utils lz4 lzma bzip2 gzip zstd
# sudo snap install yq
if ! command -v yq &>/dev/null || ! yq --version 2>/dev/null | grep -q "v4."; then
Expand Down Expand Up @@ -109,7 +109,7 @@ jobs:
with:
name: buildroot
path: |
buildroot*.zip
buildroot*.zip
retention-days: 5

- name: Release
Expand All @@ -118,7 +118,7 @@ jobs:
with:
tag: ${{ env.VERSION }}
prerelease: ${{ inputs.prerelease }}
artifacts: buildroot*.zip
artifacts: buildroot*.zip
body: |
Buildroot version: ${{ env.BUILDROOT_VERSION }}
Kernel version: ${{ env.KERNEL_VERSION }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/cks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:

- name: Init Env
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
sudo timedatectl set-timezone "Asia/Shanghai"
Expand Down Expand Up @@ -212,12 +212,12 @@ jobs:
cp -rf ${PARTY3RD_PATH}/* ${ROOT_PATH}/firmware/
echo "extract all modules"
for F in output/*.tgz; do
for F in output/*.tgz; do
echo "${F}"
mkdir -p "${F%.tgz}"
tar -zxf "${F}" -C "${F%.tgz}" || echo "Failed to extract ${F}"
done
echo "get firmware"
SOURCE=/tmp/linux-firmware
git clone --depth=1 https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git ${SOURCE}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ jobs:
tar -zcf ${ROOT_PATH}/${PLATFORM}-${VERSION}-${KVER}.tgz -C ${ROOT_PATH}/output .
else
tar -zcf ${ROOT_PATH}/${PLATFORM}-${KVER}.tgz -C ${ROOT_PATH}/output .
fi
fi
- name: Upload to Artifacts
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -290,7 +290,7 @@ jobs:
[ -e "firmware/${L}" ] && echo "Used thirdparty ${L}" || echo "Missing ${L}"
fi
done <<<$(find output -name \*.ko -exec sh -c '/sbin/modinfo {} | grep ^firmware' \; | awk '{print $2}')
tar -zcf firmware.tgz -C firmware .
- name: Upload to Artifacts
Expand Down
37 changes: 28 additions & 9 deletions .github/workflows/rr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
sudo timedatectl set-timezone "Asia/Shanghai"
sudo apt update
sudo apt install -y locales busybox dialog gettext sed gawk jq curl
sudo apt install -y locales busybox dialog gettext sed gawk jq curl
sudo apt install -y python-is-python3 python3-pip libelf-dev qemu-utils cpio xz-utils lz4 lzma bzip2 gzip zstd
# sudo snap install yq
if ! command -v yq &>/dev/null || ! yq --version 2>/dev/null | grep -q "v4."; then
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:
getExtractor "files/mnt/p3/extractor"
echo "Repack initrd"
[ "${{ inputs.prerelease }}" = "true" ] && RELEASE="pre" || RELEASE=""
sed -i "s/^RR_RELEASE=.*$/RR_RELEASE=\"${RELEASE}\"/" files/initrd/opt/rr/include/consts.sh
Expand All @@ -137,7 +137,7 @@ jobs:
for i in {1..3}; do
[ ! -d "files/mnt/p${i}" ] && continue
rm -rf "/tmp/mnt/p${i}"
mkdir -p "/tmp/mnt/p${i}"
Expand Down Expand Up @@ -168,6 +168,10 @@ jobs:
echo "Create RR ova"
convertova "rr.img" "rr.ova"
echo "Create RR vhd"
createvmc "rr.vmc"
qemu-img convert rr.img -O vpc rr.vhd
# Zip image and generate checksum
- name: Pack
run: |
Expand All @@ -178,11 +182,17 @@ jobs:
sha256sum rr_1GB.img >sha256sum
zip -9 "rr_1GB-${VERSION}.img.zip" rr_1GB.img sha256sum
sha256sum rr.img >sha256sum
zip -9 "rr-${VERSION}.img.zip" rr.img sha256sum
sha256sum rr.ova >sha256sum
zip -9 "rr-${VERSION}.ova.zip" rr.ova sha256sum
sha256sum rr.vhd >sha256sum
sha256sum rr.vmc >>sha256sum
zip -9 "rr-${VERSION}.vhd.zip" rr.vhd rr.vmc sha256sum
# update.zip
sha256sum update-list.yml update-check.sh >sha256sum
zip -9j "update-${VERSION}.zip" update-list.yml update-check.sh
Expand Down Expand Up @@ -225,6 +235,7 @@ jobs:
# sha256sum
sha256sum "rr-${VERSION}.img.zip" >sha256sum
sha256sum "rr-${VERSION}.ova.zip" >>sha256sum
sha256sum "rr-${VERSION}.vhd.zip" >>sha256sum
sha256sum "update-${VERSION}.zip" >>sha256sum
sha256sum "updateall-${VERSION}.zip" >>sha256sum
Expand All @@ -248,25 +259,33 @@ jobs:
- name: Upload to Artifacts
uses: actions/upload-artifact@v4
with:
name: rr_1GB.img
name: rr.vhd
path: |
rr/rr_1GB-*.zip
rr/rr-*.vhd.zip
retention-days: 5

- name: Upload to Artifacts
uses: actions/upload-artifact@v4
with:
name: update
name: updateall
path: |
rr/update-*.zip
rr/updateall-*.zip
retention-days: 5

- name: Upload to Artifacts
uses: actions/upload-artifact@v4
with:
name: updateall
name: rr_1GB.img
path: |
rr/updateall-*.zip
rr/rr_1GB-*.zip
retention-days: 5

- name: Upload to Artifacts
uses: actions/upload-artifact@v4
with:
name: update
path: |
rr/update-*.zip
retention-days: 5

# Publish a release if is a tag
Expand Down

0 comments on commit 64d807a

Please sign in to comment.