Skip to content

Commit

Permalink
在release中新增固件的同名sha256哈希值文件 方便做文件完整性校验
Browse files Browse the repository at this point in the history
  • Loading branch information
wukongdaily committed Jan 4, 2025
1 parent 353e9ad commit 769cea5
Show file tree
Hide file tree
Showing 7 changed files with 77 additions and 7 deletions.
13 changes: 12 additions & 1 deletion .github/workflows/build-glinet-23.05.4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,15 @@ jobs:
-e INCLUDE_DOCKER=$include_docker \
immortalwrt/imagebuilder:mediatek-filogic-openwrt-23.05.4 /bin/bash /home/build/immortalwrt/build.sh
done
- name: Generate Firmware SHA-256
run: |
cp ${{ github.workspace }}/bin/targets/mediatek/filogic/*.bin ${{ github.workspace }}
for file in *.bin; do
sha256sum "$file" > "$file.sha256"
sha256sum -c "$file.sha256"
done
- name: Create info
run: |
if [ "${{ github.event.inputs.include_docker }}" == "yes" ]; then
Expand All @@ -78,7 +87,9 @@ jobs:
uses: softprops/action-gh-release@v2.1.0
with:
tag_name: Autobuild-GL-iNet
files: ${{ github.workspace }}/bin/targets/mediatek/filogic/*.bin
files: |
${{ github.workspace }}/*.bin
${{ github.workspace }}/*.sha256
token: ${{ secrets.GITHUB_TOKEN }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12 changes: 11 additions & 1 deletion .github/workflows/build-rockchip-immortalWrt-23.05.4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ jobs:
immortalwrt/imagebuilder:rockchip-armv8-openwrt-23.05.4 /bin/bash /home/build/immortalwrt/build.sh
done
- name: Generate Firmware SHA-256
run: |
cp ${{ github.workspace }}/bin/targets/rockchip/armv8/*.img.gz ${{ github.workspace }}
for file in *.img.gz; do
sha256sum "$file" > "$file.sha256"
sha256sum -c "$file.sha256"
done
- name: Create GitHub Release Info
uses: softprops/action-gh-release@v2.1.0
with:
Expand All @@ -61,7 +69,9 @@ jobs:
uses: softprops/action-gh-release@v2.1.0
with:
tag_name: Autobuild-23.05.4
files: ${{ github.workspace }}/bin/targets/rockchip/armv8/*.img.gz
files: |
${{ github.workspace }}/*.img.gz
${{ github.workspace }}/*.sha256
token: ${{ secrets.GITHUB_TOKEN }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
11 changes: 10 additions & 1 deletion .github/workflows/build-rockchip-immortalWrt-24.10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,13 @@ jobs:
-e ROOTFS_PARTSIZE=$rootfs_partsize \
immortalwrt/imagebuilder:rockchip-armv8-openwrt-24.10 /bin/bash /home/build/immortalwrt/build.sh
done
- name: Generate Firmware SHA-256
run: |
cp ${{ github.workspace }}/bin/targets/rockchip/armv8/*.img.gz ${{ github.workspace }}
for file in *.img.gz; do
sha256sum "$file" > "$file.sha256"
sha256sum -c "$file.sha256"
done
- name: Create GitHub Release Info
uses: softprops/action-gh-release@v2.1.0
Expand All @@ -103,7 +110,9 @@ jobs:
uses: softprops/action-gh-release@v2.1.0
with:
tag_name: Autobuild
files: ${{ github.workspace }}/bin/targets/rockchip/armv8/*.img.gz
files: |
${{ github.workspace }}/*.img.gz
${{ github.workspace }}/*.sha256
token: ${{ secrets.GITHUB_TOKEN }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13 changes: 12 additions & 1 deletion .github/workflows/build-sunxi-cortexa53-23.05.4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,15 @@ jobs:
-e ROOTSIZE=$size \
immortalwrt/imagebuilder:sunxi-cortexa53-openwrt-23.05.4 /bin/bash /home/build/immortalwrt/build.sh
done
- name: Generate Firmware SHA-256
run: |
cp ${{ github.workspace }}/bin/targets/sunxi/cortexa53/*squashfs-sdcard.img.gz ${{ github.workspace }}
for file in *.img.gz; do
sha256sum "$file" > "$file.sha256"
sha256sum -c "$file.sha256"
done
- name: Create info
run: |
if [ "${{ github.event.inputs.include_docker }}" == "yes" ]; then
Expand All @@ -89,7 +98,9 @@ jobs:
uses: softprops/action-gh-release@v2.1.0
with:
tag_name: Autobuild-sunxi-cortexa53
files: ${{ github.workspace }}/bin/targets/sunxi/cortexa53/*squashfs-sdcard.img.gz
files: |
${{ github.workspace }}/*.img.gz
${{ github.workspace }}/*.sha256
token: ${{ secrets.GITHUB_TOKEN }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13 changes: 12 additions & 1 deletion .github/workflows/build-sunxi-cortexa53-24.10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,15 @@ jobs:
-e ROOTSIZE=$size \
immortalwrt/imagebuilder:sunxi-cortexa53-openwrt-24.10 /bin/bash /home/build/immortalwrt/build.sh
done
- name: Generate Firmware SHA-256
run: |
cp ${{ github.workspace }}/bin/targets/sunxi/cortexa53/*squashfs-sdcard.img.gz ${{ github.workspace }}
for file in *.img.gz; do
sha256sum "$file" > "$file.sha256"
sha256sum -c "$file.sha256"
done
- name: Create info
run: |
if [ "${{ github.event.inputs.include_docker }}" == "yes" ]; then
Expand All @@ -91,7 +100,9 @@ jobs:
uses: softprops/action-gh-release@v2.1.0
with:
tag_name: Autobuild-sunxi-cortexa53
files: ${{ github.workspace }}/bin/targets/sunxi/cortexa53/*squashfs-sdcard.img.gz
files: |
${{ github.workspace }}/*.img.gz
${{ github.workspace }}/*.sha256
token: ${{ secrets.GITHUB_TOKEN }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10 changes: 9 additions & 1 deletion .github/workflows/build-x86-64-23.05.4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ jobs:
immortalwrt/imagebuilder:x86-64-openwrt-23.05.4 /bin/bash /home/build/immortalwrt/build.sh
done
- name: Generate Firmware SHA-256
run: |
cp ${{ github.workspace }}/bin/targets/x86/64/immortalwrt-23.05.4-x86-64-generic-squashfs-combined-efi.img.gz ${{ github.workspace }}
sha256sum immortalwrt-23.05.4-x86-64-generic-squashfs-combined-efi.img.gz > immortalwrt-23.05.4-x86-64-generic-squashfs-combined-efi.img.gz.sha256
sha256sum -c immortalwrt-23.05.4-x86-64-generic-squashfs-combined-efi.img.gz.sha256
- name: Create info
run: |
if [ "${{ github.event.inputs.include_docker }}" == "yes" ]; then
Expand All @@ -73,7 +79,9 @@ jobs:
uses: softprops/action-gh-release@v2.1.0
with:
tag_name: Autobuild-x86-64
files: ${{ github.workspace }}/bin/targets/x86/64/immortalwrt-23.05.4-x86-64-generic-squashfs-combined-efi.img.gz
files: |
${{ github.workspace }}/immortalwrt-23.05.4-x86-64-generic-squashfs-combined-efi.img.gz
${{ github.workspace }}/immortalwrt-23.05.4-x86-64-generic-squashfs-combined-efi.img.gz.sha256
token: ${{ secrets.GITHUB_TOKEN }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/build-x86-64-24.10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ jobs:
immortalwrt/imagebuilder:x86-64-openwrt-24.10 /bin/bash /home/build/immortalwrt/build.sh
done
- name: Generate Firmware SHA-256
run: |
cp ${{ github.workspace }}/bin/targets/x86/64/*squashfs-combined-efi.img.gz ${{ github.workspace }}
for file in *squashfs-combined-efi.img.gz; do
sha256sum "$file" > "$file.sha256"
sha256sum -c "$file.sha256"
done
- name: Create info
run: |
if [ "${{ github.event.inputs.include_docker }}" == "yes" ]; then
Expand All @@ -72,7 +80,9 @@ jobs:
uses: softprops/action-gh-release@v2.1.0
with:
tag_name: Autobuild-x86-64
files: ${{ github.workspace }}/bin/targets/x86/64/*squashfs-combined-efi.img.gz
files: |
${{ github.workspace }}/*squashfs-combined-efi.img.gz
${{ github.workspace }}/*.sha256
token: ${{ secrets.GITHUB_TOKEN }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit 769cea5

Please sign in to comment.