File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change
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
You can’t perform that action at this time.
0 commit comments