Skip to content

Commit 178e125

Browse files
authored
Merge pull request #38 from datavisyn/new_deployment-product_token
feat: add CHECKOUT_TOKEN support for build-product.yml
2 parents c6d8d80 + 029e109 commit 178e125

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

.github/workflows/build-product.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ on:
1515
required: false
1616
GITLAB_HOST:
1717
required: false
18+
CHECKOUT_TOKEN:
19+
required: false
20+
description: Token to pass to the build-single job. Use this to allow the checkout actions to access private repositories.
1821

1922
concurrency:
2023
group: "${{ github.workflow }}-${{ github.ref || github.head_ref }}"

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ on:
1717
required: false
1818
GITLAB_HOST:
1919
required: false
20+
CHECKOUT_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"
@@ -58,7 +61,7 @@ jobs:
5861
# checkout specific repository
5962
- uses: actions/checkout@v3
6063
with:
61-
token: ${{ github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
64+
token: ${{ secrets.CHECKOUT_TOKEN || github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
6265
# checkout this workflow repository to get actions
6366
- uses: actions/checkout@v3
6467
with:
@@ -121,7 +124,7 @@ jobs:
121124
git config --global url."git+https://$GITLAB_TOKEN@$GITLAB_HOST/".insteadOf "git+ssh://git@$GITLAB_HOST:"
122125
fi
123126
env:
124-
_GITHUB_TOKEN: ${{ github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
127+
_GITHUB_TOKEN: ${{ secrets.CHECKOUT_TOKEN || github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
125128
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}
126129
GITLAB_HOST: ${{ secrets.GITLAB_HOST }}
127130
- name: Git clone app
@@ -141,7 +144,7 @@ jobs:
141144
REPO: ${{ steps.get-parameters.outputs.repo }}
142145
BRANCH: ${{ steps.get-parameters.outputs.branch }}
143146
APP: ${{ steps.get-parameters.outputs.app }}
144-
GH_TOKEN: ${{ github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
147+
GH_TOKEN: ${{ secrets.CHECKOUT_TOKEN || github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
145148
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}
146149
GITLAB_HOST: ${{ secrets.GITLAB_HOST }}
147150
- name: Copy docker sources

0 commit comments

Comments
 (0)