Skip to content

Commit 0557140

Browse files
authored
Fix source repo for build (#91)
Signed-off-by: v.oleynikov <[email protected]>
1 parent 1804246 commit 0557140

File tree

4 files changed

+22
-5
lines changed

4 files changed

+22
-5
lines changed

.github/workflows/build_dev.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ env:
1010
GOLANG_VERSION: ${{ vars.GOLANG_VERSION }}
1111
GOPROXY: ${{ secrets.GOPROXY }}
1212
SOURCE_REPO: ${{ secrets.SOURCE_REPO }}
13+
SOURCE_REPO_SSH_KEY: ${{ secrets.SOURCE_REPO_SSH_KEY }}
1314
BASE_IMAGES_VERSION: "v0.4.3"
1415

1516
on:
@@ -78,7 +79,7 @@ jobs:
7879
- name: Set vars
7980
id: set-vars
8081
run: |
81-
# Slect edition for build, default ee
82+
# Select edition for build, default ee
8283
if echo "${{ steps.get-labels.outputs.result }}" | grep -q "edition/ce"; then
8384
echo "MODULE_EDITION=ce" >> "$GITHUB_OUTPUT"
8485
else
@@ -112,7 +113,7 @@ jobs:
112113
113114
- uses: actions/checkout@v4
114115

115-
- name: Download base images
116+
- name: Download base images and auth prepare
116117
run: |
117118
wget https://fox.flant.com/api/v4/projects/deckhouse%2Fbase-images/packages/generic/base_images/$BASE_IMAGES_VERSION/base_images.yml -O base_images.yml
118119
cat base_images.yml
@@ -127,3 +128,5 @@ jobs:
127128
module_source: "${{ vars.DEV_MODULE_SOURCE }}"
128129
module_name: ${{ vars.MODULE_NAME }}
129130
module_tag: ${{ env.MODULES_MODULE_TAG }}
131+
source_repo: ${{ secrets.SOURCE_REPO }}
132+
source_repo_ssh_key: ${{ secrets.SOURCE_REPO_SSH_KEY }}

.github/workflows/build_prod.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ env:
1111
GOLANG_VERSION: ${{ vars.GOLANG_VERSION }}
1212
GOPROXY: ${{ secrets.GOPROXY }}
1313
SOURCE_REPO: ${{ secrets.SOURCE_REPO }}
14+
SOURCE_REPO_SSH_KEY: ${{ secrets.SOURCE_REPO_SSH_KEY }}
1415
BASE_IMAGES_VERSION: "v0.4.3"
1516

1617
on:
@@ -38,7 +39,7 @@ jobs:
3839
3940
- uses: actions/checkout@v4
4041

41-
- name: Download base images
42+
- name: Download base images and auth prepare
4243
run: |
4344
wget https://fox.flant.com/api/v4/projects/deckhouse%2Fbase-images/packages/generic/base_images/$BASE_IMAGES_VERSION/base_images.yml -O base_images.yml
4445
cat base_images.yml
@@ -59,6 +60,8 @@ jobs:
5960
module_name: ${{ vars.MODULE_NAME }}
6061
module_tag: ${{ github.ref_name }}
6162
secondary_repo: "${{ vars.DEV_MODULE_SOURCE }}/${{ vars.MODULE_NAME }}"
63+
source_repo: ${{ secrets.SOURCE_REPO }}
64+
source_repo_ssh_key: ${{ secrets.SOURCE_REPO_SSH_KEY }}
6265

6366
prod_ee_setup_build:
6467
runs-on: [self-hosted, large]
@@ -100,6 +103,8 @@ jobs:
100103
module_name: ${{ vars.MODULE_NAME }}
101104
module_tag: ${{ github.ref_name }}
102105
secondary_repo: "${{ vars.DEV_MODULE_SOURCE }}/${{ vars.MODULE_NAME }}"
106+
source_repo: ${{ secrets.SOURCE_REPO }}
107+
source_repo_ssh_key: ${{ secrets.SOURCE_REPO_SSH_KEY }}
103108

104109
prod_fe_setup_build:
105110
runs-on: [self-hosted, large]
@@ -141,6 +146,8 @@ jobs:
141146
module_name: ${{ vars.MODULE_NAME }}
142147
module_tag: ${{ github.ref_name }}
143148
secondary_repo: "${{ vars.DEV_MODULE_SOURCE }}/${{ vars.MODULE_NAME }}"
149+
source_repo: ${{ secrets.SOURCE_REPO }}
150+
source_repo_ssh_key: ${{ secrets.SOURCE_REPO_SSH_KEY }}
144151

145152
prod_se_setup_build:
146153
runs-on: [self-hosted, large]
@@ -182,6 +189,8 @@ jobs:
182189
module_name: ${{ vars.MODULE_NAME }}
183190
module_tag: ${{ github.ref_name }}
184191
secondary_repo: "${{ vars.DEV_MODULE_SOURCE }}/${{ vars.MODULE_NAME }}"
192+
source_repo: ${{ secrets.SOURCE_REPO }}
193+
source_repo_ssh_key: ${{ secrets.SOURCE_REPO_SSH_KEY }}
185194

186195
prod_se_plus_setup_build:
187196
runs-on: [self-hosted, large]
@@ -223,3 +232,5 @@ jobs:
223232
module_name: ${{ vars.MODULE_NAME }}
224233
module_tag: ${{ github.ref_name }}
225234
secondary_repo: "${{ vars.DEV_MODULE_SOURCE }}/${{ vars.MODULE_NAME }}"
235+
source_repo: ${{ secrets.SOURCE_REPO }}
236+
source_repo_ssh_key: ${{ secrets.SOURCE_REPO_SSH_KEY }}

.github/workflows/deploy_dev.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,7 @@ jobs:
6868
module_source: "${{ vars.DEV_MODULE_SOURCE }}"
6969
module_name: ${{ vars.MODULE_NAME }}
7070
module_tag: ${{ github.event.inputs.tag }}
71+
source_repo: ${{ secrets.SOURCE_REPO }}
72+
source_repo_ssh_key: ${{ secrets.SOURCE_REPO_SSH_KEY }}
73+
7174
- uses: deckhouse/modules-actions/deploy@v2

.github/workflows/trivy_image_check.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
needs: [build_dev]
2525
steps:
2626
- uses: actions/checkout@v4
27-
- uses: deckhouse/modules-actions/cve_scan@main
27+
- uses: deckhouse/modules-actions/cve_scan@v2
2828
with:
2929
image: ${{ vars.DEV_MODULE_SOURCE }}/${{ vars.MODULE_NAME }}
3030
tag: pr${{ github.event.number }}
@@ -45,7 +45,7 @@ jobs:
4545
run: |
4646
echo "MODULE_IMAGE_TAG=${{ github.event.inputs.release_branch || 'main' }}" >> $GITHUB_ENV
4747
if: github.event_name != 'workflow_dispatch'
48-
- uses: deckhouse/modules-actions/cve_scan@main
48+
- uses: deckhouse/modules-actions/cve_scan@v2
4949
with:
5050
image: ${{ vars.DEV_MODULE_SOURCE }}/${{ vars.MODULE_NAME }}
5151
tag: ${{ env.MODULE_IMAGE_TAG || 'main' }}

0 commit comments

Comments
 (0)