Skip to content

Commit 2091133

Browse files
chore: create workflow to update makefile dependencies (#173)
* chore: create workflow to update makefile dependencies fetches latest version for all embedded stuff and update them in the makefile. creates a pr at the end. * chore: fix wrong var name and add comment
1 parent 8321e0d commit 2091133

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Custom Dependabot
2+
on:
3+
schedule:
4+
# everyday at midnight.
5+
- cron: '0 0 * * *'
6+
jobs:
7+
update-dependencies:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Check out repo
11+
uses: actions/checkout@v4
12+
- name: AdminConsole
13+
run: |
14+
export VERSION=`curl https://api.github.com/repos/replicatedhq/kots-helm/tags | jq -r .[].name | grep -v alpha | head -1 | tr -d v`
15+
sed -i "/^ADMIN_CONSOLE_CHART_VERSION/c\ADMIN_CONSOLE_CHART_VERSION = $VERSION" Makefile
16+
- name: Embedded Cluster Operator
17+
run: |
18+
export VERSION=`curl https://api.github.com/repos/replicatedhq/embedded-cluster-operator/tags | jq -r .[].name | head -1 | tr -d v`
19+
sed -i "/^EMBEDDED_OPERATOR_CHART_VERSION/c\EMBEDDED_OPERATOR_CHART_VERSION = $VERSION" Makefile
20+
- name: OpenEBS
21+
run: |
22+
export VERSION=`curl https://api.github.com/repos/openebs/charts/releases/latest | jq -r .name | tr -d openebs-`
23+
sed -i "/^OPENEBS_CHART_VERSION/c\OPENEBS_CHART_VERSION = $VERSION" Makefile
24+
- name: Kubectl
25+
run: |
26+
export VERSION=`curl -L -s https://dl.k8s.io/release/stable.txt`
27+
sed -i "/^KUBECTL_VERSION/c\KUBECTL_VERSION = $VERSION" Makefile
28+
- name: K0sctl
29+
run: |
30+
export VERSION=`curl https://api.github.com/repos/k0sproject/k0sctl/releases/latest | jq -r .name`
31+
sed -i "/^K0SCTL_VERSION/c\K0SCTL_VERSION = $VERSION" Makefile
32+
- name: K0s
33+
run: |
34+
export VERSION=`curl https://api.github.com/repos/k0sproject/k0s/releases/latest | jq -r .name`
35+
sed -i "/^K0S_VERSION/c\K0S_VERSION = $VERSION" Makefile
36+
- name: Troubleshoot
37+
run: |
38+
export VERSION=`curl https://api.github.com/repos/replicatedhq/troubleshoot/releases/latest | jq -r .name`
39+
sed -i "/^TROUBLESHOOT_VERSION/c\TROUBLESHOOT_VERSION = $VERSION" Makefile
40+
- name: Create Pull Request
41+
uses: peter-evans/create-pull-request@v5

0 commit comments

Comments
 (0)