Can anyone tell me exactly how PKG_MIRROR_HASH is calculated in the Makefile?

For example



If everything else is known and PKG_MIRROR_HASH is unknown, how is this value calculated?

PKG_MIRROR_HASH, I see the document, its from packaged a tar.xz after the calculation of sha256, but this tar.xz please ask how to pack, I tried for a long time, the final hash can not be matched, no way to go to the openwrt/gh-action-sdk compile

Or what script or other tool is used to generate this PKG_MIRROR_HASH? I would like to learn the process of generating this value

No skip, openwrt/gh-action-sdk doesn't work with skip, I want to learn the process of generating this value.

I've tried a lot of things, such as the following

After $SHA_smartdns has been obtained, the process is as follows, what is wrong... or what is the correct method?

  git clone smartdns-$(date +1.%Y.%m.%d-%H)
  cd smartdns-$(date +1.%Y.%m.%d-%H)
  git checkout $SHA_smartdns
  git submodule update --init --recursive
  echo "TAR_TIMESTAMP=$(git log -1 --format='@%ct')" >> $GITHUB_ENV
  rm -rf .git

after that

  tar --numeric-owner --owner=0 --group=0 --mode=a-s --sort=name $$$${TAR_TIMESTAMP:+--mtime="$$$$TAR_TIMESTAMP"} -c smartdns-$(date +1.%Y.%m.%d-%H) | xz -zc -7e > ../smartdns-$(date +1.%Y.%m.%d-%H).tar.xz
  echo "PKG_MIRROR_HASH=$(sha256sum ../smartdns-$(date +1.%Y.%m.%d-%H).tar.xz | cut -d ' ' -f1)" >> $GITHUB_ENV

After that change the Makefile ready to go to openwrt/gh-action-sdk@main to run

  sed -i "s/PKG_VERSION:=.*/PKG_VERSION:=$(date +1.%Y.%m.%d-%H)/" Makefile
  sed -i "s/PKG_SOURCE_VERSION:=.*/PKG_SOURCE_VERSION:=$SHA_smartdns/" Makefile

Or the steps for tar are changed to

tar --numeric-owner --owner=0 --group=0 --mode=a-s --sort=name ${TAR_TIMESTAMP:+-mtime="$TAR_TIMESTAMP"} -c smartdns-$(date +1.%Y.%m.%d-%H ) | xz -zc -7e > ... /smartdns-$(date +1.%Y.%m.%d-%H).tar.xz

None of the above is correct ......

The tar steps I saw in the log of openwrt/gh-action-sdk run and in a mk file on the official website, the mk file is $$$${TAR_TIMESTAMP:+-- mtime="$$$$TAR_TIMESTAMP"} and the log is ${TAR_TIMESTAMP:+-- mtime="$TAR_TIMESTAMP"}, all wrong, no way to run in openwrt/gh-action-sdk!
here tips to pack the source code to tar.xz after the file to generate hash, the specific how to pack did not say, and then look at running openwrt/gh-action -sdk logs, I copied it myself is not quite right, and searched, searched the following

here 29 to 66 lines
I found this I see and log only a little different, I tried both, but also not right ......

Please help...