Make release headers dynamicall with a bash script to keep svg files refreshing.

This commit is contained in:
Igor Pecovnik
2025-09-11 15:49:19 +02:00
parent 05e29688bf
commit 806848392e
3 changed files with 55 additions and 18 deletions

26
release-headers/community.sh Executable file
View File

@@ -0,0 +1,26 @@
#!/bin/bash
TS=$(date +%s)
cat <<EOF
<p align='center'>
<a href="https://www.armbian.com"><img src="https://raw.githubusercontent.com/armbian/.github/master/profile/logosmall.png" alt="Armbian logo"></a>
<h1 align=center>Community releases</h1>
</p>
<p align='center'>
<a href="https://www.armbian.com"><img
src="https://github.armbian.com/current.svg?$TS"
alt="Armbian Linux CURRENT"
width="425"></a> &nbsp;
<a href="https://www.armbian.com"><img
src="https://github.armbian.com/edge.svg?$TS"
alt="Armbian Linux EDGE"
width="425"></a>
</p>
<p align='center'>
Community courtesy builds are not maintained by Armbian team, but exist thanks to
<a href="https://github.com/sponsors/armbian">community support</a>.
</p>
EOF

25
release-headers/os.sh Executable file
View File

@@ -0,0 +1,25 @@
#!/bin/bash
TS=$(date +%s)
cat <<EOF
<p align='center'>
<a href="https://www.armbian.com"><img src="https://raw.githubusercontent.com/armbian/.github/master/profile/logosmall.png" alt="Armbian logo"></a>
<h1 align=center>Rolling releases</h1>
</p>
<p align='center'>
<a href="https://www.armbian.com"><img
src="https://github.armbian.com/current.svg?$TS"
alt="Armbian Linux CURRENT"
width="425"></a> &nbsp;
<a href="https://www.armbian.com"><img
src="https://github.armbian.com/edge.svg?$TS"
alt="Armbian Linux EDGE"
width="425"></a>
</p>
<p align='center'>
Rolling releases are daily builds with the latest kernel and userspace packages for supported hardware.
</p>
EOF

View File

@@ -317,24 +317,10 @@ jobs:
- name: "Generate body file"
if: ${{ (github.event.inputs.skipImages || [[skipImagesDefaults]]) != 'yes' }}
run: |
echo "
<p align='center'>
<a href='https://www.armbian.com'>
<img src='https://raw.githubusercontent.com/armbian/.github/master/profile/tux-two.png' width='400'></a></p>
<h1 align=center>Rolling releases</h1>
<p align=center>
<a href='https://www.armbian.com'><img alt='Armbian Linux stable' src='https://img.shields.io/badge/dynamic/json?label=Armbian%20Linux%20current&query=CURRENT&color=f71000&cacheSeconds=600&style=for-the-badge&url=https%3A%2F%2Fgithub.com%2Farmbian%2Fscripts%2Freleases%2Fdownload%2Fstatus%2Frunners_capacity.json'></a>
<a href='https://www.armbian.com'><img alt='Armbian Linux rolling' src='https://img.shields.io/badge/dynamic/json?label=Armbian%20Linux%20edge&query=EDGE&color=34be5b&cacheSeconds=600&style=for-the-badge&url=https%3A%2F%2Fgithub.com%2Farmbian%2Fscripts%2Freleases%2Fdownload%2Fstatus%2Frunners_capacity.json'></a>
</p>
<br>
- rolling releases are available at the bottom of <a href='https://www.armbian.com/download/' target=_blanks>official download pages</a>
- if you want to change automated builds variants, edit <a href='https://github.com/armbian/os/tree/main/userpatches'>.yaml files</a>
- for old builds with unknown support status check <a href='https://archive.armbian.com' target=_blank>archives</a>
<br>
&nbsp;
</p>" > body.html
# Make html document
if [[ -f release-headers/${{ env.RELEASE_REPOSITORY }}.sh ]]; then
bash release-headers/${{ env.RELEASE_REPOSITORY }}.sh > body.html
fi
- uses: ncipollo/release-action@v1
if: ${{ (github.event.inputs.nightlybuild || [[nightlybuildDefaults]]) == 'yes' && (github.event.inputs.skipImages || [[skipImagesDefaults]]) != 'yes' }}