File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 1 file changed +40
-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 : source
18
+
19
+ - name : Download latest release files from hkubectl
20
+ run : |
21
+ set -e
22
+ export latestVersion=$(curl -s https://api.github.com/repos/kube-HPC/hkubectl/releases/latest | jq -r .tag_name)
23
+ mkdir -p site/hkubectl_files
24
+ curl -L --retry 3 --retry-delay 5 https://github.com/kube-HPC/hkubectl/releases/download/${latestVersion}/hkubectl-linux -o site/hkubectl_files/hkubectl-linux
25
+ curl -L --retry 3 --retry-delay 5 https://github.com/kube-HPC/hkubectl/releases/download/${latestVersion}/hkubectl-macos -o site/hkubectl_files/hkubectl-macos
26
+ curl -L --retry 3 --retry-delay 5 https://github.com/kube-HPC/hkubectl/releases/download/${latestVersion}/hkubectl-win.exe -o site/hkubectl_files/hkubectl-win.exe
27
+
28
+ - name : Commit and push updated files to kube-HPC.github.io
29
+ run : |
30
+ git config --global user.email "[email protected] "
31
+ git config --global user.name "GitHub Action"
32
+ git checkout source || git checkout -b source origin/source
33
+ git add -A
34
+ if ! git diff --cached --quiet; then
35
+ git commit -m "Update hkubectl download files to the latest release"
36
+ git push origin source
37
+ else
38
+ echo "No changes to commit, skipping commit and push."
39
+ fi
40
+
You can’t perform that action at this time.
0 commit comments