Skip to content

Commit 8125aba

Browse files
authored
Merge pull request #499 from slashdevops/fix/github-workflows
fix: github workflows improvements and version updates
2 parents 6d639a8 + f61ef00 commit 8125aba

3 files changed

Lines changed: 24 additions & 1 deletion

File tree

.github/workflows/container-image.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ jobs:
4848
run: |
4949
docker version
5050
51+
- name: Set up QEMU
52+
uses: docker/setup-qemu-action@v4
53+
54+
- name: Set up Docker Buildx
55+
uses: docker/setup-buildx-action@v4
56+
5157
- name: Build container images
5258
run: |
5359
GIT_VERSION=${{ github.ref_name }} make container-build

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ jobs:
115115
# See the file: CHANGELOG.md
116116
draft: false
117117
prerelease: false
118+
generate_release_notes: true
118119
token: ${{ secrets.GITHUB_TOKEN }}
119120
files: |
120121
dist/assets/**

Makefile

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,11 @@ $(if $(filter $(MAKE_DEBUG),true),\
6868
${1} \
6969
, \
7070
$(if $(filter $(MAKE_STOP_ON_ERRORS),true),\
71-
@${1} > /dev/null && printf " 🤞 ${1} ✅\n" || (printf " ${1} ❌ 🖕\n"; exit 1) \
71+
$(if $(findstring >, $1),\
72+
@${1} 2>/dev/null && printf " 🤞 ${1} ✅\n" || (printf " ${1} ❌ 🖕\n"; exit 1) \
73+
, \
74+
@${1} > /dev/null && printf " 🤞 ${1} ✅\n" || (printf " ${1} ❌ 🖕\n"; exit 1) \
75+
) \
7276
, \
7377
$(if $(findstring >, $1),\
7478
@${1} 2>/dev/null; _exit_code=$$?; if [ $$_exit_code -eq 0 ]; then printf " 🤞 ${1} ✅\n"; else printf " ${1} ❌ 🖕\n"; fi; exit $$_exit_code \
@@ -98,6 +102,11 @@ go-vet: ## Vet go code
98102
@printf "👉 Vet go code...\n"
99103
$(call exec_cmd, go vet ./... )
100104

105+
.PHONY: go-betteralign
106+
go-betteralign: install-betteralign ## Align go code with betteralign
107+
@printf "👉 Aligning go code with betteralign...\n"
108+
$(call exec_cmd, betteralign -apply ./... )
109+
101110
.PHONY: go-generate
102111
go-generate: ## Generate go code
103112
@printf "👉 Generating go code...\n"
@@ -339,6 +348,13 @@ container-publish-aws-ecr: ## Publish the container image to AWS ECR
339348
) \
340349
)
341350

351+
###############################################################################
352+
##@ Install Commands
353+
.PHONY: install-betteralign
354+
install-betteralign: ## Install betteralign for code alignment (https://github.com/dkorunic/betteralign)
355+
@printf "👉 Installing betteralign...\n"
356+
$(call exec_cmd, go install github.com/dkorunic/betteralign/cmd/betteralign@latest )
357+
342358
###############################################################################
343359
##@ Support Commands
344360
.PHONY: clean

0 commit comments

Comments
 (0)