Skip to content

Commit e662409

Browse files
committed
Script removal
1 parent 45b940a commit e662409

File tree

3 files changed

+34
-50
lines changed

3 files changed

+34
-50
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# fetch_latest_iso.sh
2+
# D.A.Pelasgus
3+
4+
name: Fetch Latest ISO Download Link
5+
6+
on:
7+
push:
8+
branches:
9+
- main
10+
workflow_dispatch:
11+
12+
jobs:
13+
fetch-latest-iso:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v2
19+
20+
- name: Make fetch_latest_iso.sh executable
21+
run: chmod +x fetch_latest_iso.sh
22+
23+
- name: Run shell script to fetch ISO download link
24+
env:
25+
REPO: "chimeraos/install-media"
26+
OUTPUT_FILE: "output/latest_iso_url.txt"
27+
run: ./fetch_latest_iso.sh
28+
29+
- name: Load download link into environment
30+
run: echo "DOWNLOAD_LINK=$(cat .iso_download.env | grep ISO_URL | cut -d '=' -f2)" >> $GITHUB_ENV
31+
32+
- name: Insert download link into Mustache file
33+
run: sed -i "s|{{downloadLink}}|$DOWNLOAD_LINK|g" path/to/your_template.mustache
34+

fetch_latest_iso.sh

Lines changed: 0 additions & 26 deletions
This file was deleted.

src/download.mustache

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -57,28 +57,4 @@
5757
</div>
5858
</a>
5959
</div>
60-
61-
<!-- JavaScript function to set the download link -->
62-
<script>
63-
async function setDownloadLink() {
64-
try {
65-
const response = await fetch("https://api.github.com/repos/chimeraos/install-media/releases/latest");
66-
const data = await response.json();
67-
const isoAsset = data.assets.find(asset => asset.name.endsWith('.iso'));
68-
69-
if (isoAsset) {
70-
const downloadLink = document.getElementById("downloadLink");
71-
downloadLink.href = isoAsset.browser_download_url;
72-
downloadLink.download = isoAsset.name;
73-
} else {
74-
console.error("ISO file not found in the latest release.");
75-
}
76-
} catch (error) {
77-
console.error("Error fetching the latest release:", error);
78-
}
79-
}
80-
81-
setDownloadLink();
82-
</script>
83-
8460
{{> footer}}

0 commit comments

Comments
 (0)