Skip to content

Tar modules

Tar modules #122

Workflow file for this run

name: Tar modules
on:
release:
types: [published]
workflow_dispatch:
jobs:
tar:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Tar modules
run: |
#curl -kL https://github.com/PeterSuh-Q3/arpl-modules/releases/latest/download/epyc7002-7.1-5.10.55.tgz -o /tmp/epyc7002-7.1-5.10.55.tgz
#curl -kL https://github.com/PeterSuh-Q3/arpl-modules/releases/latest/download/epyc7002-7.2-5.10.55.tgz -o /tmp/epyc7002-7.2-5.10.55.tgz
ls -d *-*/ | grep -v -e braswell -e broadwellnkv2 -e broadwellntbap -e purley -e epyc7002
for D in `ls -d *-*/ | grep -v -e braswell -e broadwellnkv2 -e broadwellntbap -e purley -e epyc7002`; do
E=$(echo ${D} | sed 's#/##')
echo "backup ${E} tcrp modules"
for file in "$E"/*.ko; do
if [ -f "$file" ]; then
new_name="${file}.bak"
mv -vf "$file" "$new_name"
fi
done
echo "download last rr ${E} module pack"
curl -kL https://github.com/PeterSuh-Q3/arpl-modules/releases/download/rr-last/${E}.tgz -o /tmp/${E}.tgz
echo "extract last rr ${E} module pack"
tar -xaf /tmp/${E}.tgz -C ./${E}/
echo "restore ${E} tcrp modules"
for file in "$E"/*.ko.bak; do
if [ -f "$file" ]; then
new_name="${file%.bak}"
mv -vf "$file" "$new_name"
fi
done
echo "copy ${E} vanilla module"
[ -d ./vanilla/${E} ] && cp -vf ./vanilla/${E}/*.ko ./${E}/
echo "copy ${E} thirdparty module"
[ -d ./thirdparty/${E} ] && cp -vf ./thirdparty/${E}/*.ko ./${E}/
(cd ${E} && tar caf ../${E}.tgz *)
sha256sum ./${E}.tgz | awk '{print $1}' | awk '{print $1 " '${E}.tgz' modpack.sha256"}' >> files-chksum
done
echo "download latest epyc7002 module pack"
curl -kLO https://github.com/PeterSuh-Q3/arpl-modules/releases/latest/download/epyc7002-7.1-5.10.55.tgz
curl -kLO https://github.com/PeterSuh-Q3/arpl-modules/releases/latest/download/epyc7002-7.2-5.10.55.tgz
sha256sum ./epyc7002-7.1-5.10.55.tgz | awk '{print $1}' | awk '{print $1 " 'epyc7002-7.1-5.10.55.tgz' modpack.sha256"}' >> files-chksum
sha256sum ./epyc7002-7.2-5.10.55.tgz | awk '{print $1}' | awk '{print $1 " 'epyc7002-7.2-5.10.55.tgz' modpack.sha256"}' >> files-chksum
#echo "copy rr's firmware.tgz"
#cp -vf /tmp/firmware.tgz ./firmware.tgz
#sha256sum ./firmware.tgz | awk '{print $1}' | awk '{print $1 " 'firmware.tgz' firmware.sha256"}' >> files-chksum
cat files-chksum
# Publish a release if is a tag
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
*.tgz, files-chksum
#- name: Trigger Workflow in Another Repository
# uses: peter-evans/repository-dispatch@v1
# with:
# token: ${{ secrets.ACCESS_TOKEN }}
# repository: PeterSuh-Q3/tcrp-modules
# event-type: trigger-workflow