Skip to content

Commit bf02acd

Browse files
committed
added flow
1 parent ce0de31 commit bf02acd

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Update Download Files from hkubectl Release
2+
3+
# Trigger the workflow when a new release is published in the hkubectl repository
4+
on:
5+
repository_dispatch:
6+
types: [hkubectl-release]
7+
8+
jobs:
9+
update-files:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout kube-HPC.github.io repository
14+
uses: actions/checkout@v2
15+
with:
16+
repository: kube-HPC/kube-HPC.github.io
17+
ref: main
18+
19+
- name: Download latest release files from hkubectl
20+
run: |
21+
export latestVersion=$(curl -s https://api.github.com/repos/kube-HPC/hkubectl/releases/latest | jq -r .tag_name)
22+
mkdir -p site/hkubectl_files
23+
curl -L https://github.com/kube-HPC/hkubectl/releases/download/${latestVersion}/hkubectl-linux -o hkubectl_files/hkubectl-linux
24+
curl -L https://github.com/kube-HPC/hkubectl/releases/download/${latestVersion}/hkubectl-macos -o hkubectl_files/hkubectl-macos
25+
curl -L https://github.com/kube-HPC/hkubectl/releases/download/${latestVersion}/hkubectl-win.exe -o hkubectl_files/hkubectl-win.exe
26+
27+
- name: Commit and push updated files to kube-HPC.github.io
28+
run: |
29+
git config --global user.name "GitHub Actions"
30+
git config --global user.email "[email protected]"
31+
git add hkubectl_files/*
32+
git commit -m "Update hkubectl download files to the latest release" || echo "No changes to commit"
33+
git push origin main

0 commit comments

Comments
 (0)