Skip to content

Commit 7babde6

Browse files
committed
feat: automatic checksum updater
Usage: * update the versions (e.g. take them from renovate) * run: ``` git diff -U0 | ../bldr/_out/bldr-linux-amd64 update ``` Bldr will figure out checksums and update them all. Signed-off-by: Andrey Smirnov <[email protected]>
1 parent 6d34adc commit 7babde6

File tree

13 files changed

+333
-633
lines changed

13 files changed

+333
-633
lines changed

.github/workflows/ci.yaml

Lines changed: 106 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
22
#
3-
# Generated on 2025-09-04T12:37:31Z by kres 784fa1f.
3+
# Generated on 2025-09-15T14:59:48Z by kres d1c95db.
44

55
concurrency:
66
group: ${{ github.head_ref || github.run_id }}
@@ -26,8 +26,7 @@ jobs:
2626
packages: write
2727
pull-requests: read
2828
runs-on:
29-
- self-hosted
30-
- generic
29+
group: generic
3130
if: (!startsWith(github.head_ref, 'renovate/') && !startsWith(github.head_ref, 'dependabot/'))
3231
steps:
3332
- name: gather-system-info
@@ -70,24 +69,9 @@ jobs:
7069
- name: base
7170
run: |
7271
make base
73-
- name: unit-tests
74-
run: |
75-
make unit-tests
76-
- name: unit-tests-race
77-
run: |
78-
make unit-tests-race
79-
- name: coverage
80-
uses: codecov/codecov-action@v5
81-
with:
82-
files: _out/coverage-unit-tests.txt
83-
token: ${{ secrets.CODECOV_TOKEN }}
84-
timeout-minutes: 3
8572
- name: bldr
8673
run: |
8774
make bldr
88-
- name: lint
89-
run: |
90-
make lint
9175
- name: Login to registry
9276
if: github.event_name != 'pull_request'
9377
uses: docker/login-action@v3
@@ -129,3 +113,107 @@ jobs:
129113
files: |-
130114
_out/bldr-*
131115
_out/sha*.txt
116+
lint:
117+
runs-on:
118+
group: generic
119+
if: github.event_name == 'pull_request'
120+
needs:
121+
- default
122+
steps:
123+
- name: gather-system-info
124+
id: system-info
125+
uses: kenchan0130/[email protected]
126+
continue-on-error: true
127+
- name: print-system-info
128+
run: |
129+
MEMORY_GB=$((${{ steps.system-info.outputs.totalmem }}/1024/1024/1024))
130+
131+
OUTPUTS=(
132+
"CPU Core: ${{ steps.system-info.outputs.cpu-core }}"
133+
"CPU Model: ${{ steps.system-info.outputs.cpu-model }}"
134+
"Hostname: ${{ steps.system-info.outputs.hostname }}"
135+
"NodeName: ${NODE_NAME}"
136+
"Kernel release: ${{ steps.system-info.outputs.kernel-release }}"
137+
"Kernel version: ${{ steps.system-info.outputs.kernel-version }}"
138+
"Name: ${{ steps.system-info.outputs.name }}"
139+
"Platform: ${{ steps.system-info.outputs.platform }}"
140+
"Release: ${{ steps.system-info.outputs.release }}"
141+
"Total memory: ${MEMORY_GB} GB"
142+
)
143+
144+
for OUTPUT in "${OUTPUTS[@]}";do
145+
echo "${OUTPUT}"
146+
done
147+
continue-on-error: true
148+
- name: checkout
149+
uses: actions/checkout@v5
150+
- name: Unshallow
151+
run: |
152+
git fetch --prune --unshallow
153+
- name: Set up Docker Buildx
154+
id: setup-buildx
155+
uses: docker/setup-buildx-action@v3
156+
with:
157+
driver: remote
158+
endpoint: tcp://buildkit-amd64.ci.svc.cluster.local:1234
159+
timeout-minutes: 10
160+
- name: lint
161+
run: |
162+
make lint
163+
unit-tests:
164+
runs-on:
165+
group: generic
166+
if: github.event_name == 'pull_request'
167+
needs:
168+
- default
169+
steps:
170+
- name: gather-system-info
171+
id: system-info
172+
uses: kenchan0130/[email protected]
173+
continue-on-error: true
174+
- name: print-system-info
175+
run: |
176+
MEMORY_GB=$((${{ steps.system-info.outputs.totalmem }}/1024/1024/1024))
177+
178+
OUTPUTS=(
179+
"CPU Core: ${{ steps.system-info.outputs.cpu-core }}"
180+
"CPU Model: ${{ steps.system-info.outputs.cpu-model }}"
181+
"Hostname: ${{ steps.system-info.outputs.hostname }}"
182+
"NodeName: ${NODE_NAME}"
183+
"Kernel release: ${{ steps.system-info.outputs.kernel-release }}"
184+
"Kernel version: ${{ steps.system-info.outputs.kernel-version }}"
185+
"Name: ${{ steps.system-info.outputs.name }}"
186+
"Platform: ${{ steps.system-info.outputs.platform }}"
187+
"Release: ${{ steps.system-info.outputs.release }}"
188+
"Total memory: ${MEMORY_GB} GB"
189+
)
190+
191+
for OUTPUT in "${OUTPUTS[@]}";do
192+
echo "${OUTPUT}"
193+
done
194+
continue-on-error: true
195+
- name: checkout
196+
uses: actions/checkout@v5
197+
- name: Unshallow
198+
run: |
199+
git fetch --prune --unshallow
200+
- name: Set up Docker Buildx
201+
id: setup-buildx
202+
uses: docker/setup-buildx-action@v3
203+
with:
204+
driver: remote
205+
endpoint: tcp://buildkit-amd64.ci.svc.cluster.local:1234
206+
timeout-minutes: 10
207+
- name: unit-tests
208+
run: |
209+
make unit-tests
210+
- name: unit-tests-race
211+
run: |
212+
make unit-tests-race
213+
- name: coverage
214+
uses: codecov/codecov-action@v5
215+
with:
216+
files: _out/coverage-unit-tests.txt
217+
flags: unit-tests
218+
token: ${{ secrets.CODECOV_TOKEN }}
219+
timeout-minutes: 3

.github/workflows/slack-notify-ci-failure.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
22
#
3-
# Generated on 2025-08-20T12:12:40Z by kres 18c31cf.
3+
# Generated on 2025-09-15T14:59:48Z by kres d1c95db.
44

55
"on":
66
workflow_run:
@@ -14,8 +14,7 @@ name: slack-notify-failure
1414
jobs:
1515
slack-notify:
1616
runs-on:
17-
- self-hosted
18-
- generic
17+
group: generic
1918
if: github.event.workflow_run.conclusion == 'failure' && github.event.workflow_run.event != 'pull_request'
2019
steps:
2120
- name: Slack Notify

.github/workflows/slack-notify.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
22
#
3-
# Generated on 2025-08-20T12:12:40Z by kres 18c31cf.
3+
# Generated on 2025-09-15T14:59:48Z by kres d1c95db.
44

55
"on":
66
workflow_run:
@@ -12,8 +12,7 @@ name: slack-notify
1212
jobs:
1313
slack-notify:
1414
runs-on:
15-
- self-hosted
16-
- generic
15+
group: generic
1716
if: github.event.workflow_run.conclusion != 'skipped'
1817
steps:
1918
- name: Get PR number

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
22
#
3-
# Generated on 2025-08-20T12:12:40Z by kres 18c31cf.
3+
# Generated on 2025-09-15T14:59:48Z by kres d1c95db.
44

55
# common variables
66

@@ -240,6 +240,9 @@ lint-markdown: ## Runs markdownlint.
240240
.PHONY: lint
241241
lint: lint-golangci-lint lint-gofumpt lint-govulncheck lint-markdown ## Run all linters for the project.
242242

243+
.PHONY: lint-fmt
244+
lint-fmt: lint-golangci-lint-fmt ## Run all linter formatters and fix up the source tree.
245+
243246
.PHONY: image-bldr
244247
image-bldr: ## Builds image for bldr.
245248
@$(MAKE) registry-$@ IMAGE_NAME="bldr"

0 commit comments

Comments
 (0)