10
10
11
11
on :
12
12
pull_request :
13
- types : [ opened, edited, synchronize ]
13
+ types : [opened, edited, synchronize]
14
14
push :
15
15
branches :
16
16
- main
33
33
run : |
34
34
MODULES_MODULE_TAG="$(echo pr${{github.event.pull_request.number}})"
35
35
echo "MODULES_MODULE_TAG=$MODULES_MODULE_TAG" >> "$GITHUB_ENV"
36
-
36
+
37
37
- name : Set vars for main
38
38
if : ${{ github.ref_name == 'main' }}
39
39
run : |
@@ -88,31 +88,31 @@ jobs:
88
88
uses : actions/setup-go@v5
89
89
with :
90
90
go-version : " 1.21"
91
-
91
+
92
92
- name : Install Task
93
93
uses : arduino/setup-task@v2
94
-
94
+
95
95
- uses : actions/checkout@v4
96
-
96
+
97
97
- name : Run lint virtualization-controller
98
98
run : |
99
99
task virtualization-controller:init
100
100
task virtualization-controller:lint:go
101
-
101
+
102
102
lint_yaml :
103
103
runs-on : ubuntu-latest
104
104
name : Run yaml linter
105
105
steps :
106
106
- name : Install Task
107
107
uses : arduino/setup-task@v2
108
-
108
+
109
109
- uses : actions/checkout@v4
110
110
with :
111
111
ref : ${{ github.event.pull_request.head.sha }}
112
112
113
113
- name : Lint yaml with prettier
114
114
run : task -p lint:prettier:yaml
115
-
115
+
116
116
test :
117
117
runs-on : ubuntu-latest
118
118
name : Run unit test
@@ -121,12 +121,12 @@ jobs:
121
121
uses : actions/setup-go@v5
122
122
with :
123
123
go-version : " 1.21"
124
-
124
+
125
125
- name : Install Task
126
126
uses : arduino/setup-task@v2
127
-
127
+
128
128
- uses : actions/checkout@v4
129
-
129
+
130
130
- name : Run test hooks
131
131
run : |
132
132
task hooks:test
@@ -139,19 +139,19 @@ jobs:
139
139
dev_setup_build :
140
140
runs-on : ubuntu-latest
141
141
name : Build and Push images
142
- steps :
142
+ steps :
143
143
- name : Set vars for PR
144
144
if : ${{ github.ref_name != 'main' }}
145
145
run : |
146
146
MODULES_MODULE_TAG="$(echo pr${{github.event.pull_request.number}})"
147
147
echo "MODULES_MODULE_TAG=$MODULES_MODULE_TAG" >> "$GITHUB_ENV"
148
-
148
+
149
149
- name : Set vars for main
150
150
if : ${{ github.ref_name == 'main' }}
151
151
run : |
152
152
MODULES_MODULE_TAG="$(echo v0.0.0-${{ github.ref_name }})"
153
153
echo "MODULES_MODULE_TAG=$MODULES_MODULE_TAG" >> "$GITHUB_ENV"
154
-
154
+
155
155
- name : Print vars
156
156
run : |
157
157
echo MODULES_REGISTRY=$MODULES_REGISTRY
@@ -171,9 +171,9 @@ jobs:
171
171
- uses : deckhouse/modules-actions/build@v1
172
172
173
173
- run : |
174
- IMAGE_SRC="$(jq -r '.Images."bundle".DockerImageName' images_tags_werf.json)"
175
- IMAGE_DST="$(jq -r '.Images.bundle.DockerRepo' images_tags_werf.json):main"
176
- echo "✨ Bundle image : Pushing ${IMAGE_SRC} to ${IMAGE_DST}"
177
- crane copy ${IMAGE_SRC} ${IMAGE_DST}
174
+ IMAGE_SRC="$(jq -r '.Images."bundle".DockerImageName' images_tags_werf.json)"
175
+ IMAGE_DST="$(jq -r '.Images.bundle.DockerRepo' images_tags_werf.json):main"
176
+ echo "✨ Bundle image : Pushing ${IMAGE_SRC} to ${IMAGE_DST}"
177
+ crane copy ${IMAGE_SRC} ${IMAGE_DST}
178
178
if: ${{ github.ref_name == 'main' }}
179
179
name: Bundle image tag main
0 commit comments