File tree 1 file changed +32
-0
lines changed
1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 44
44
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
45
45
with :
46
46
args : ' ./k8s-parallel-exec-*'
47
+
48
+ - name : Checkout Homebrew tap repository
49
+ uses : actions/checkout@v2
50
+ with :
51
+ repository : cin/homebrew-k8s-parallel-exec
52
+
53
+ - name : Update Homebrew formula
54
+ run : |
55
+ FORMULA_FILE="k8s-parallel-exec.rb"
56
+ NEW_VERSION="${{ github.event.release.tag_name }}"
57
+ sed -i "s|version \"[^\"]*\"|version \"${NEW_VERSION}\"|g" "${FORMULA_FILE}"
58
+
59
+ function update_sha {
60
+ local new_sha=$(sha256sum $1 | awk '{print $1}')
61
+ gawk -i inplace -v platform="$1" -v new_sha="$new_sha" '
62
+ index($0, platform) {
63
+ print; getline; sub(/sha256 ".*"/, "sha256 \"" new_sha "\"");
64
+ }1' "${FORMULA_FILE}"
65
+ }
66
+
67
+ update_sha k8s-parallel-exec-linux-amd64
68
+ update_sha k8s-parallel-exec-linux-arm64
69
+ update_sha k8s-parallel-exec-darwin-amd64
70
+ update_sha k8s-parallel-exec-darwin-arm64
71
+
72
+ - name : Commit and push changes
73
+ run : |
74
+ git config --local user.email "[email protected] "
75
+ git config --local user.name "GitHub Action"
76
+ git add "k8s-parallel-exec.rb"
77
+ git commit -m "Update k8s-parallel-exec to ${{ github.event.release.tag_name }}"
78
+ git push
You can’t perform that action at this time.
0 commit comments