[controller] Add data wipe #321
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Go linter for images | |
env: | |
GO_BUILD_TAGS: "ce se seplus ee csepro" | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
test: | |
name: Go linter for images | |
runs-on: [self-hosted, regular] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Setup Go environment | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.23.5' | |
- name: Install golangci-lint | |
run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.61.0 | |
- name: Run Go lint | |
run: | | |
basedir=$(pwd) | |
failed='false' | |
for i in $(find images -type f -name go.mod);do | |
dir=$(echo $i | sed 's/go.mod$//') | |
cd $basedir/$dir | |
# check all editions | |
for edition in $GO_BUILD_TAGS ;do | |
echo "Running linter in $dir (edition: $edition)" | |
golangci-lint run --build-tags $edition | |
if [ $? -ne 0 ]; then | |
echo "Linter failed in $dir (edition: $edition)" | |
failed='true' | |
fi | |
done | |
done | |
if [ $failed == 'true' ]; then | |
exit 1 | |
fi |