Skip to content

Commit b826ee1

Browse files
ci: add ci auto-author-assign (#72)
Signed-off-by: Nikita Korolev <[email protected]>
1 parent e6ee59b commit b826ee1

9 files changed

+100
-88
lines changed
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# .github/workflows/auto-author-assign.yml
2+
name: Auto Author Assign
3+
4+
on:
5+
pull_request:
6+
types: [opened, reopened]
7+
8+
permissions:
9+
pull-requests: write
10+
11+
jobs:
12+
assign-author:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: toshimaru/[email protected]

.github/workflows/build_dev.yml

+18-18
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ env:
1010

1111
on:
1212
pull_request:
13-
types: [ opened, edited, synchronize ]
13+
types: [opened, edited, synchronize]
1414
push:
1515
branches:
1616
- main
@@ -33,7 +33,7 @@ jobs:
3333
run: |
3434
MODULES_MODULE_TAG="$(echo pr${{github.event.pull_request.number}})"
3535
echo "MODULES_MODULE_TAG=$MODULES_MODULE_TAG" >> "$GITHUB_ENV"
36-
36+
3737
- name: Set vars for main
3838
if: ${{ github.ref_name == 'main' }}
3939
run: |
@@ -88,31 +88,31 @@ jobs:
8888
uses: actions/setup-go@v5
8989
with:
9090
go-version: "1.21"
91-
91+
9292
- name: Install Task
9393
uses: arduino/setup-task@v2
94-
94+
9595
- uses: actions/checkout@v4
96-
96+
9797
- name: Run lint virtualization-controller
9898
run: |
9999
task virtualization-controller:init
100100
task virtualization-controller:lint:go
101-
101+
102102
lint_yaml:
103103
runs-on: ubuntu-latest
104104
name: Run yaml linter
105105
steps:
106106
- name: Install Task
107107
uses: arduino/setup-task@v2
108-
108+
109109
- uses: actions/checkout@v4
110110
with:
111111
ref: ${{ github.event.pull_request.head.sha }}
112112

113113
- name: Lint yaml with prettier
114114
run: task -p lint:prettier:yaml
115-
115+
116116
test:
117117
runs-on: ubuntu-latest
118118
name: Run unit test
@@ -121,12 +121,12 @@ jobs:
121121
uses: actions/setup-go@v5
122122
with:
123123
go-version: "1.21"
124-
124+
125125
- name: Install Task
126126
uses: arduino/setup-task@v2
127-
127+
128128
- uses: actions/checkout@v4
129-
129+
130130
- name: Run test hooks
131131
run: |
132132
task hooks:test
@@ -139,19 +139,19 @@ jobs:
139139
dev_setup_build:
140140
runs-on: ubuntu-latest
141141
name: Build and Push images
142-
steps:
142+
steps:
143143
- name: Set vars for PR
144144
if: ${{ github.ref_name != 'main' }}
145145
run: |
146146
MODULES_MODULE_TAG="$(echo pr${{github.event.pull_request.number}})"
147147
echo "MODULES_MODULE_TAG=$MODULES_MODULE_TAG" >> "$GITHUB_ENV"
148-
148+
149149
- name: Set vars for main
150150
if: ${{ github.ref_name == 'main' }}
151151
run: |
152152
MODULES_MODULE_TAG="$(echo v0.0.0-${{ github.ref_name }})"
153153
echo "MODULES_MODULE_TAG=$MODULES_MODULE_TAG" >> "$GITHUB_ENV"
154-
154+
155155
- name: Print vars
156156
run: |
157157
echo MODULES_REGISTRY=$MODULES_REGISTRY
@@ -171,9 +171,9 @@ jobs:
171171
- uses: deckhouse/modules-actions/build@v1
172172

173173
- 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}
178178
if: ${{ github.ref_name == 'main' }}
179179
name: Bundle image tag main

.github/workflows/build_dev_self_hosted.yml

+7-8
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ env:
1010

1111
on:
1212
pull_request:
13-
types: [ labeled ]
13+
types: [labeled]
1414

1515
defaults:
1616
run:
@@ -127,7 +127,6 @@ jobs:
127127
- name: Lint yaml with prettier
128128
run: task -p lint:prettier:yaml
129129

130-
131130
test:
132131
needs: check_label
133132
if: needs.check_label.outputs.should_run
@@ -178,17 +177,17 @@ jobs:
178177
echo MODULES_MODULE_NAME=$MODULES_MODULE_NAME
179178
echo MODULES_MODULE_SOURCE=$MODULES_MODULE_SOURCE
180179
echo MODULES_MODULE_TAG=$MODULES_MODULE_TAG
181-
180+
182181
- uses: actions/checkout@v4
183182
with:
184183
fetch-depth: 0
185184
- uses: deckhouse/modules-actions/setup@v1
186185
- uses: deckhouse/modules-actions/build@v1
187-
186+
188187
- run: |
189-
IMAGE_SRC="$(jq -r '.Images."bundle".DockerImageName' images_tags_werf.json)"
190-
IMAGE_DST="$(jq -r '.Images.bundle.DockerRepo' images_tags_werf.json):main"
191-
echo "✨ Bundle image : Pushing ${IMAGE_SRC} to ${IMAGE_DST}"
192-
crane copy ${IMAGE_SRC} ${IMAGE_DST}
188+
IMAGE_SRC="$(jq -r '.Images."bundle".DockerImageName' images_tags_werf.json)"
189+
IMAGE_DST="$(jq -r '.Images.bundle.DockerRepo' images_tags_werf.json):main"
190+
echo "✨ Bundle image : Pushing ${IMAGE_SRC} to ${IMAGE_DST}"
191+
crane copy ${IMAGE_SRC} ${IMAGE_DST}
193192
if: ${{ github.ref_name == 'main' }}
194193
name: Bundle image tag main

.github/workflows/build_prod.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ env:
1212
on:
1313
push:
1414
tags:
15-
- 'v[0-9]+.[0-9]+.[0-9]+'
15+
- "v[0-9]+.[0-9]+.[0-9]+"
1616
concurrency:
1717
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
1818
cancel-in-progress: true
@@ -24,7 +24,7 @@ jobs:
2424
steps:
2525
- name: SET VAR
2626
run: |
27-
echo "MODULES_MODULE_SOURCE=$MODULES_REGISTRY/$MODULE_SOURCE_NAME/ce/modules" >> "$GITHUB_ENV"
27+
echo "MODULES_MODULE_SOURCE=$MODULES_REGISTRY/$MODULE_SOURCE_NAME/ce/modules" >> "$GITHUB_ENV"
2828
- run: |
2929
echo $MODULES_REGISTRY
3030
echo $MODULES_MODULE_NAME
@@ -40,7 +40,7 @@ jobs:
4040
- uses: deckhouse/modules-actions/setup@v1
4141
- uses: deckhouse/modules-actions/build@v1
4242

43-
- name: Register the module
43+
- name: Register the module
4444
run: |
4545
echo "✨ Register the module ${MODULES_MODULE_NAME}"
4646
crane append \
@@ -55,7 +55,7 @@ jobs:
5555
steps:
5656
- name: SET VAR
5757
run: |
58-
echo "MODULES_MODULE_SOURCE=$MODULES_REGISTRY/$MODULE_SOURCE_NAME/ee/modules" >> "$GITHUB_ENV"
58+
echo "MODULES_MODULE_SOURCE=$MODULES_REGISTRY/$MODULE_SOURCE_NAME/ee/modules" >> "$GITHUB_ENV"
5959
- run: |
6060
echo $MODULES_REGISTRY
6161
echo $MODULES_MODULE_NAME
@@ -71,7 +71,7 @@ jobs:
7171
- uses: deckhouse/modules-actions/setup@v1
7272
- uses: deckhouse/modules-actions/build@v1
7373

74-
- name: Register the module
74+
- name: Register the module
7575
run: |
7676
echo "✨ Register the module ${MODULES_MODULE_NAME}"
7777
crane append \
@@ -86,7 +86,7 @@ jobs:
8686
steps:
8787
- name: SET VAR
8888
run: |
89-
echo "MODULES_MODULE_SOURCE=$MODULES_REGISTRY/$MODULE_SOURCE_NAME/fe/modules" >> "$GITHUB_ENV"
89+
echo "MODULES_MODULE_SOURCE=$MODULES_REGISTRY/$MODULE_SOURCE_NAME/fe/modules" >> "$GITHUB_ENV"
9090
- run: |
9191
echo $MODULES_REGISTRY
9292
echo $MODULES_MODULE_NAME
@@ -101,8 +101,8 @@ jobs:
101101
- uses: actions/checkout@v4
102102
- uses: deckhouse/modules-actions/setup@v1
103103
- uses: deckhouse/modules-actions/build@v1
104-
105-
- name: Register the module
104+
105+
- name: Register the module
106106
run: |
107107
echo "✨ Register the module ${MODULES_MODULE_NAME}"
108108
crane append \

.github/workflows/cleanup_dev.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ env:
1313
on:
1414
workflow_dispatch:
1515
schedule:
16-
- cron: '12 0 * * 6'
16+
- cron: "12 0 * * 6"
1717

1818
defaults:
1919
run:
@@ -31,4 +31,4 @@ jobs:
3131
run: |
3232
werf cleanup \
3333
--repo ${MODULES_MODULE_SOURCE}/${MODULES_MODULE_NAME} \
34-
--without-kube=true
34+
--without-kube=true

.github/workflows/deploy_dev.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ on:
2828
description: "The module's tag, which must include the -dev postfix. For example: v1.21.1-dev"
2929
type: string
3030
required: true
31-
31+
3232
enableBuild:
3333
type: boolean
3434
default: true
35-
description: 'Set to true if build is required'
35+
description: "Set to true if build is required"
3636

3737
jobs:
3838
deploy-dev:
@@ -69,4 +69,3 @@ jobs:
6969
shell: bash
7070

7171
- uses: deckhouse/modules-actions/deploy@v1
72-

0 commit comments

Comments
 (0)