File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 push :
55 tags :
66 - centraldogma-*
7+ workflow_dispatch :
8+ inputs :
9+ version :
10+ description : ' Target version x.y.z'
11+ required : true
12+ type : string
713
814env :
915 LC_ALL : ' en_US.UTF-8'
1622 if : github.repository == 'line/centraldogma'
1723 runs-on : ubuntu-latest
1824 steps :
19- - name : Check out the repo
25+ - name : Check out tag from workflow_dispatch
26+ if : github.event_name == 'workflow_dispatch'
27+ uses : actions/checkout@v4
28+ with :
29+ ref : centraldogma-${{ github.event.inputs.version }}
30+
31+ - name : Check out tag on push
32+ if : github.event_name != 'workflow_dispatch'
2033 uses : actions/checkout@v4
2134
2235 - name : Set up JDK 25
@@ -38,12 +51,15 @@ jobs:
3851 id : release-version
3952 uses : actions/github-script@v4
4053 with :
41- # Extract a release version from 'refs/tags/centraldogma-x.y.z' tag.
4254 script : |
43- const version = context.ref.replace(/.*centraldogma-/, '')
44- console.log('Release version: ' + version)
45- return version
46- result-encoding : string
55+ let version;
56+ if (context.eventName === 'workflow_dispatch') {
57+ version = context.payload.inputs.version;
58+ } else {
59+ version = context.ref.replace(/.*centraldogma-/, '');
60+ }
61+ console.log('Release version:', version);
62+ return version;
4763
4864 - name : Log in to the Container registry
4965 uses : docker/login-action@v3
You can’t perform that action at this time.
0 commit comments