|
1 | 1 | name:bump_version
|
2 | 2 | on:
|
3 |
| -push |
4 |
| -# workflow_dispatch: |
5 |
| -# inputs: |
6 |
| -# version: |
7 |
| -# default: "" |
8 |
| -# required: true |
9 |
| -# description: "unprefixed version number (ex: '1.14.2')" |
| 3 | +workflow_dispatch: |
| 4 | +inputs: |
| 5 | +version: |
| 6 | +default:"" |
| 7 | +required:true |
| 8 | +description:"unprefixed version number (ex: '1.14.2')" |
10 | 9 | jobs:
|
11 |
| -bump: |
| 10 | +coder-cli: |
12 | 11 | runs-on:ubuntu-latest
|
13 | 12 | steps:
|
14 | 13 | -uses:actions/checkout@v2
|
15 | 14 | -name:Configure git
|
16 | 15 | run:|
|
17 |
| - git config--globaluser.email "bot@coder.com" |
18 |
| - git config--globaluser.name "Coder Bot" |
| 16 | + git config user.name github-actions |
| 17 | + git config user.email github-actions@github.com |
19 | 18 | -name:Open PR to bump coder-cli version
|
20 | 19 | env:
|
21 | 20 | GITHUB_TOKEN:${{ secrets.GITHUB_TOKEN }}
|
22 | 21 | run:|
|
23 |
| - ./ci/scripts/bump-coder-cli.sh1.14.1 |
| 22 | + ./ci/scripts/bump-coder-cli.sh${{ github.event.inputs.version }} |
24 | 23 | git diff
|
25 |
| - git checkout -b bump-coder-cli-1.14.1 |
| 24 | + git checkout -b bump-coder-cli-${{ github.event.inputs.version }} |
26 | 25 | git add coder-cli.rb
|
27 |
| - git commit -m "feat: bump coder-cli version tov1.14.1" |
28 |
| - git push --set-upstream origin bump-coder-cli-1.14.1 |
| 26 | + git commit -m "feat: bump coder-cli version tov${{ github.event.inputs.version }}" |
| 27 | + git push --set-upstream origin bump-coder-cli-${{ github.event.inputs.version }} |
29 | 28 | gh pr create \
|
30 |
| - --title="bump coder-cli version tov1.14.1" \ |
| 29 | + --title="bump coder-cli version tov${{ github.event.inputs.version }}" \ |
31 | 30 | --body="" \
|
32 | 31 | --reviewer cmoog
|