Skip to content

Commit 4fca427

Browse files
committed
Move from input to secrets as secrets can't be passed as input
1 parent 6d1a6db commit 4fca427

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

.github/workflows/build-product.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ on:
1515
required: false
1616
GITLAB_HOST:
1717
required: false
18-
inputs:
19-
token:
20-
type: string
18+
TOKEN:
2119
required: false
2220
description: Token to pass to the build-single and build-workspace jobs. Use this to allow the checkout actions to access private repositories.
2321

@@ -99,7 +97,6 @@ jobs:
9997
image_tag2: ${{ needs.prepare-build.outputs.image_tag2 }}
10098
build_time: ${{ needs.prepare-build.outputs.build_time }}
10199
stage: ${{ needs.prepare-build.outputs.stage }}
102-
token: ${{ inputs.token }}
103100
secrets: inherit
104101
build-workspace:
105102
needs: prepare-build

.github/workflows/build-single-product-part.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ on:
1717
required: false
1818
GITLAB_HOST:
1919
required: false
20+
TOKEN:
21+
required: false
22+
description: "token to use for the checkout actions to access private repositories"
2023
inputs:
2124
component:
2225
description: "component that should be built"
@@ -38,10 +41,6 @@ on:
3841
description: "stage for the image (develop or production) depending on the branch name"
3942
required: true
4043
type: string
41-
token:
42-
description: "token to use for the checkout actions to access private repositories"
43-
required: false
44-
type: string
4544
env:
4645
TIME_ZONE: "Europe/Vienna"
4746
NODE_VERSION: "20.9"
@@ -62,7 +61,7 @@ jobs:
6261
# checkout specific repository
6362
- uses: actions/checkout@v3
6463
with:
65-
token: ${{ inputs.token || github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
64+
token: ${{ secrets.TOKEN || github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
6665
# checkout this workflow repository to get actions
6766
- uses: actions/checkout@v3
6867
with:
@@ -125,7 +124,7 @@ jobs:
125124
git config --global url."git+https://$GITLAB_TOKEN@$GITLAB_HOST/".insteadOf "git+ssh://git@$GITLAB_HOST:"
126125
fi
127126
env:
128-
_GITHUB_TOKEN: ${{ inputs.token || github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
127+
_GITHUB_TOKEN: ${{ secrets.TOKEN || github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
129128
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}
130129
GITLAB_HOST: ${{ secrets.GITLAB_HOST }}
131130
- name: Git clone app
@@ -145,7 +144,7 @@ jobs:
145144
REPO: ${{ steps.get-parameters.outputs.repo }}
146145
BRANCH: ${{ steps.get-parameters.outputs.branch }}
147146
APP: ${{ steps.get-parameters.outputs.app }}
148-
GH_TOKEN: ${{ inputs.token || github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
147+
GH_TOKEN: ${{ secrets.TOKEN || github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
149148
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}
150149
GITLAB_HOST: ${{ secrets.GITLAB_HOST }}
151150
- name: Copy docker sources

0 commit comments

Comments
 (0)