-
-
Notifications
You must be signed in to change notification settings - Fork 149
29 lines (27 loc) · 1.25 KB
/
update-go-package-version.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# As we're using CalVer, we need to update the major version of the go package every year
# More info in this discussion: https://github.com/dask/dask-kubernetes/pull/731#discussion_r1226569925
name: "Update go package version"
on:
schedule:
- cron: "0 0 2 1 *" # 00:00 UTC on the 2nd of January every year
jobs:
update-major-go-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Update go package version
run: |
PAST_YEAR=$(date -d "last year" '+%Y')
CURRENT_YEAR=$(date '+%Y')
sed -i "s/v${PAST_YEAR}/v${CURRENT_YEAR}/g" go.mod
sed -i "s/v${PAST_YEAR}/v${CURRENT_YEAR}/g" dask_kubernetes/operator/go_client/hack/regenerate-code.sh
sed -i "s/v${PAST_YEAR}/v${CURRENT_YEAR}/g" dask_kubernetes/operator/go_client/pkg/apis/kubernetes.dask.org/v1/register.go
./dask_kubernetes/operator/go_client/hack/regenerate-code.sh
- uses: peter-evans/create-pull-request@v4
with:
commit-message: "Update major go package version"
title: "Update major go package version"
body: "Update major go package version"
branch: "update-go-package-version"
branch-suffix: "timestamp"
delete-branch: true