17
17
token : " ${{ secrets.RENKUBOT_GITHUB_TOKEN }}"
18
18
ref : ' develop'
19
19
- uses : actions/setup-node@v3
20
+ - name : Create Branch
21
+ run : git checkout -b "release/v${{ github.event.inputs.version }}"
20
22
- name : Merge Master
21
23
run : git merge origin/master
22
24
- name : Install dependencies
41
43
- name : Update Values file version
42
44
run : |
43
45
yq eval -i '.versions.latest.image.tag = "v${{ github.event.inputs.version }}"' helm-chart/renku-core/values.yaml
46
+ - name : commit changes
47
+ run : |
48
+ git config --global --add user.name "Renku Bot"
49
+ git config --global --add user.email "[email protected] "
50
+ git config push.autoSetupRemote true
51
+ git add helm-chart/renku-core/values.yaml helm-chart/renku-core/Chart.yaml renku/version.py CHANGES.rst
52
+ git commit -m "chore: release v${{ github.event.inputs.version }}"
53
+ git push
44
54
- uses : ncipollo/release-action@v1
45
55
with :
46
56
token : ${{ secrets.RENKUBOT_GITHUB_TOKEN }}
@@ -50,12 +60,25 @@ jobs:
50
60
name : " v${{ github.event.inputs.version }}"
51
61
commit : " master"
52
62
- name : Create Pull Request
53
- uses : peter-evans/create-pull-request@v4
63
+ uses : actions/github-script@v6
54
64
with :
55
- token : " ${{ secrets.RENKUBOT_GITHUB_TOKEN }}"
56
- add-paths : " CHANGES.rst,renku/version.py,helm-chart/renku-core/Chart.yaml,helm-chart/renku-core/values.yaml"
57
- commit-message : " chore: release v${{ github.event.inputs.version }}"
58
- branch : " release/v${{ github.event.inputs.version }}"
59
- base : " master"
60
- title : " chore: release v${{ github.event.inputs.version }}"
61
- body : " /deploy"
65
+ token : ${{ secrets.RENKUBOT_GITHUB_TOKEN }}
66
+ script : |
67
+ const { repo, owner } = context.repo;
68
+ const result = await github.rest.pulls.create({
69
+ title: 'chore: release v${{ github.event.inputs.version }}',
70
+ owner,
71
+ repo,
72
+ head: 'release/v${{ github.event.inputs.version }}',
73
+ base: 'master',
74
+ body: [
75
+ 'This PR is auto-generated by',
76
+ '[actions/github-script](https://github.com/actions/github-script).'
77
+ ].join('\n')
78
+ });
79
+ github.rest.issues.addLabels({
80
+ owner,
81
+ repo,
82
+ issue_number: result.data.number,
83
+ labels: ['feature', 'automated pr']
84
+ });
0 commit comments