Skip to content

v4.1.16

v4.1.16 #4

name: Build All Transcode for x25 Packages
on:
release:
types: [published]
workflow_dispatch:
jobs:
build-7-4:
name: Build DSM 7.4
uses: ./.github/workflows/Build_package_DSM74.yml
secrets: inherit
build-7-3:
name: Build DSM 7.3
needs: build-7-4
uses: ./.github/workflows/Build_package_DSM73.yml
secrets: inherit
build-7-2:
name: Build DSM 7.2
needs: build-7-3
uses: ./.github/workflows/Build_package_DSM72.yml
secrets: inherit
notify-spkrepo:
runs-on: ubuntu-latest
needs: [build-7-4, build-7-3, build-7-2]
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- name: Checkout this repo (for synology/PACKAGE_ICON.PNG and package.json)
uses: actions/checkout@v4
- name: Checkout 007revad.github.io (for thumbnails/)
uses: actions/checkout@v4
with:
repository: 007revad/007revad.github.io
token: ${{ secrets.SYNC_TOKEN }}
path: _github_io
- name: Install ImageMagick
run: sudo apt-get install -y --no-install-recommends imagemagick
- name: Resize icon and push thumbnail
run: |
set -euo pipefail
# Read package ID from package.json
# package.json may be at the repo root or under synology/ depending on the repo
if [ -f "synology/package.json" ]; then
PKG_JSON="synology/package.json"
elif [ -f "package.json" ]; then
PKG_JSON="package.json"
else
echo "ERROR: package.json not found" >&2
exit 1
fi
PKG_NAME=$(jq -r '.package' "${PKG_JSON}")
DEST="_github_io/spkrepo/thumbnails/${PKG_NAME}_120.png"
# Resize 256x256 PACKAGE_ICON.PNG → 120x120 PNG
mkdir -p "_github_io/spkrepo/thumbnails"
/usr/bin/convert synology/PACKAGE_ICON.PNG \
-resize 120x120 \
-gravity center \
-extent 120x120 \
"${DEST}"
# Commit and push if the thumbnail changed (or is new)
cd _github_io
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add "spkrepo/thumbnails/${PKG_NAME}_120.png"
if git diff --cached --quiet; then
echo "Thumbnail unchanged — skipping commit."
else
git commit -m "chore: update spkrepo thumbnail for ${PKG_NAME} [skip ci]"
git push
fi
- name: Trigger spkrepo index rebuild
run: |
curl -fsSL \
-X POST \
-H "Authorization: Bearer ${{ secrets.SYNC_TOKEN }}" \
-H "Accept: application/vnd.github+json" \
-H "Content-Type: application/json" \
https://api.github.com/repos/007revad/007revad.github.io/dispatches \
--data '{
"event_type": "spk-release",
"client_payload": {
"repo": "${{ github.repository }}",
"tag": "${{ github.event.release.tag_name }}"
}
}'