3838 description : " stage for the image (develop or production) depending on the branch name"
3939 required : true
4040 type : string
41+ token :
42+ description : " token to use for the checkout actions to access private repositories"
43+ required : false
44+ type : string
4145env :
4246 TIME_ZONE : " Europe/Vienna"
4347 NODE_VERSION : " 20.9"
5862 # checkout specific repository
5963 - uses : actions/checkout@v3
6064 with :
61- token : ${{ github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
65+ token : ${{ inputs.token || github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
6266 # checkout this workflow repository to get actions
6367 - uses : actions/checkout@v3
6468 with :
@@ -121,7 +125,7 @@ jobs:
121125 git config --global url."git+https://$GITLAB_TOKEN@$GITLAB_HOST/".insteadOf "git+ssh://git@$GITLAB_HOST:"
122126 fi
123127 env :
124- _GITHUB_TOKEN : ${{ github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
128+ _GITHUB_TOKEN : ${{ inputs.token || github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
125129 GITLAB_TOKEN : ${{ secrets.GITLAB_TOKEN }}
126130 GITLAB_HOST : ${{ secrets.GITLAB_HOST }}
127131 - name : Git clone app
@@ -141,7 +145,7 @@ jobs:
141145 REPO : ${{ steps.get-parameters.outputs.repo }}
142146 BRANCH : ${{ steps.get-parameters.outputs.branch }}
143147 APP : ${{ steps.get-parameters.outputs.app }}
144- GH_TOKEN : ${{ github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
148+ GH_TOKEN : ${{ inputs.token || github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
145149 GITLAB_TOKEN : ${{ secrets.GITLAB_TOKEN }}
146150 GITLAB_HOST : ${{ secrets.GITLAB_HOST }}
147151 - name : Copy docker sources
0 commit comments