File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : " Docker Build"
22on : [push, pull_request]
33
4+ permissions :
5+ contents : read
6+
47jobs :
58 docker-build :
69 name : Docker Build
710 runs-on : ubuntu-latest
811 steps :
912 - name : Checkout
1013 uses : actions/checkout@v5
14+ with :
15+ persist-credentials : false
1116
1217 - name : Docker Build
1318 env :
Original file line number Diff line number Diff line change @@ -2,20 +2,25 @@ name: Go
22
33on : [push, pull_request]
44
5+ permissions :
6+ contents : read
7+
58jobs :
69
710 build :
811 runs-on : ubuntu-latest
912 steps :
10- - uses : actions/checkout@v5
13+ - uses : actions/checkout@v5
14+ with :
15+ persist-credentials : false
1116
12- - name : Set up Go
13- uses : actions/setup-go@v5
14- with :
15- go-version-file : go.mod
17+ - name : Set up Go
18+ uses : actions/setup-go@v5
19+ with :
20+ go-version-file : go.mod
1621
17- - name : Build
18- run : make build
22+ - name : Build
23+ run : make build
1924
20- - name : Test
21- run : make test
25+ - name : Test
26+ run : make test
Original file line number Diff line number Diff line change 11name : Integration tests
22on : [push, pull_request]
33
4+ permissions :
5+ contents : read
6+
47jobs :
58 lint_code :
69 name : Run golangci-lint on PR
710 runs-on : ubuntu-latest
811 steps :
912 - name : Checkout code
1013 uses : actions/checkout@v5
14+ with :
15+ persist-credentials : false
1116
1217 - name : Setup go
1318 uses : actions/setup-go@v5
2227 echo '' > "${APIFILE}"
2328
2429 - name : Run golangci-lint
25- uses : golangci/golangci-lint-action@v8
30+ uses : golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
2631 with :
2732 version : v2.2.2
2833 args : --timeout 5m -v
Original file line number Diff line number Diff line change 55 tags :
66 - ' [0-9]+.[0-9]+.[0-9]+'
77
8+ permissions :
9+ contents : read
10+
811jobs :
912 build_and_push_image :
1013 name : Build and push pattern-operator image to quay.io
1114 runs-on : ubuntu-latest
1215 steps :
1316 - uses : actions/checkout@v5
17+ with :
18+ persist-credentials : false
1419
20+ # We use an env due to https://docs.zizmor.sh/audits/#remediation_18
1521 - name : Check that tag version corresponds to metadata version
1622 run : |-
1723 VERSION=$(yq -r '.spec.version' bundle/manifests/patterns-operator.clusterserviceversion.yaml)
18- TAG=${{ github.ref_name }}
24+ TAG="${ TAG_ENV }"
1925 if [ "${VERSION}" != "${TAG}" ]; then
2026 echo "Version in metadata ${VERSION} whereas tag is different: ${TAG}"
2127 exit 1
2228 fi
29+ env :
30+ TAG_ENV : ${{ github.ref_name }}
2331
2432 - name : Check that both QUAY_ROBOT_USER and QUAY_ROBOT_TOKEN exist
2533 run : |-
Original file line number Diff line number Diff line change @@ -333,3 +333,23 @@ catalog-install: config/samples/pattern-catalog-$(VERSION).yaml ## Install the O
333333config/samples/pattern-catalog-$(VERSION ) .yaml :
334334 cp config/samples/pattern-catalog.yaml config/samples/pattern-catalog-$(VERSION ) .yaml
335335 sed -i -e " s@CATALOG_IMG@$( CATALOG_IMG) @g" config/samples/pattern-catalog-$(VERSION ) .yaml
336+
337+ .PHONY : super-linter
338+ super-linter : # # Runs super linter locally
339+ rm -rf .mypy_cache
340+ podman run -e RUN_LOCAL=true -e USE_FIND_ALGORITHM=true \
341+ -e VALIDATE_ANSIBLE=false \
342+ -e VALIDATE_BASH=false \
343+ -e VALIDATE_CHECKOV=false \
344+ -e VALIDATE_DOCKERFILE_HADOLINT=false \
345+ -e VALIDATE_JSCPD=false \
346+ -e VALIDATE_JSON_PRETTIER=false \
347+ -e VALIDATE_MARKDOWN_PRETTIER=false \
348+ -e VALIDATE_PYTHON_PYLINT=false \
349+ -e VALIDATE_SHELL_SHFMT=false \
350+ -e VALIDATE_YAML=false \
351+ -e VALIDATE_YAML_PRETTIER=false \
352+ $(DISABLE_LINTERS ) \
353+ -v $(PWD ) :/tmp/lint:rw,z \
354+ -w /tmp/lint \
355+ ghcr.io/super-linter/super-linter@sha256:6c71bd17ab38ceb7acb5b93ef72f5c2288b5456a5c82693ded3ee8bb501bba7f # slim-v8.1.0
You can’t perform that action at this time.
0 commit comments