Skip to content

Commit 485135f

Browse files
committed
GitHub Action
Uses older checkout version so I can also test dependabot.
1 parent e662409 commit 485135f

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# fetch_latest_iso.yml
2+
# Author: 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+
env:
17+
REPO: "${{ env.REPO || 'chimeraos/install-media' }}"
18+
OUTPUT_FILE: "${{ env.OUTPUT_FILE || 'output/latest_iso_url.txt' }}"
19+
MUSTACHE_FILE: "${{ env.MUSTACHE_FILE || 'src/download.mustache' }}"
20+
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v2
24+
25+
- name: Make fetch_latest_iso.sh executable
26+
run: chmod +x fetch_latest_iso.sh
27+
28+
- name: Run shell script to fetch ISO download link
29+
env:
30+
REPO: ${{ env.REPO }}
31+
OUTPUT_FILE: ${{ env.OUTPUT_FILE }}
32+
run: ./fetch_latest_iso.sh
33+
34+
- name: Load download link into environment
35+
run: echo "DOWNLOAD_LINK=$(cat .iso_download.env | grep ISO_URL | cut -d '=' -f2)" >> $GITHUB_ENV
36+
37+
- name: Insert download link into Mustache file
38+
run: sed -i "s|{{downloadLink}}|$DOWNLOAD_LINK|g" "${{ env.MUSTACHE_FILE }}"

0 commit comments

Comments
 (0)