File tree Expand file tree Collapse file tree 3 files changed +9
-10
lines changed
Expand file tree Collapse file tree 3 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -24,17 +24,15 @@ jobs:
2424 type : now
2525 from_branch : development
2626 target_branch : staging
27- env :
28- GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
27+ github_token : ${{ github.token }}
2928
3029 - name : Merge staging -> uat
31303231 with :
3332 type : now
3433 from_branch : staging
3534 target_branch : uat
36- env :
37- GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
35+ github_token : ${{ github.token }}
3836` ` `
3937
4038### Merge current branch
5654 with :
5755 type : now
5856 target_branch : uat
59- env :
60- GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
57+ github_token : ${{ github.token }}
6158` ` `
6259
6360### On labeled
8582 with :
8683 label_name : ' merged in develop'
8784 target_branch : ' develop'
88- env :
89- GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
85+ github_token : ${{ github.token }}
9086` ` `
Original file line number Diff line number Diff line change 11name : ' Merge branch'
2- description : ' A GitHub Action that merge PR branch to other branchs '
2+ description : ' A GitHub Action that manage git merge for any gitflow '
33author : Miguel Savignano
44inputs :
55 type :
@@ -18,6 +18,9 @@ inputs:
1818 head_to_merge :
1919 description : ' The branch name or hash to merge. default GITHUB_SHA'
2020 required : false
21+ github_token :
22+ description : ' Github token'
23+ required : true
2124runs :
2225 using : ' docker'
2326 image : ' Dockerfile'
Original file line number Diff line number Diff line change 55@event = JSON . parse ( File . read ( ENV [ 'GITHUB_EVENT_PATH' ] ) )
66@head_to_merge = ENV [ 'INPUT_HEAD_TO_MERGE' ] || ENV [ 'INPUT_FROM_BRANCH' ] || ENV [ 'GITHUB_SHA' ] # or brach name
77@repository = ENV [ 'GITHUB_REPOSITORY' ]
8- @github_token = ENV [ 'GITHUB_TOKEN' ]
8+ @github_token = ENV [ 'INPUT_GITHUB_TOKEN' ] || ENV [ ' GITHUB_TOKEN']
99
1010inputs = {
1111 type : ENV [ 'INPUT_TYPE' ] || MergeBrachService ::TYPE_LABELED , # labeled | comment | now
You can’t perform that action at this time.
0 commit comments