Skip to content

Commit 415d063

Browse files
author
Andrey Klimentyev
authored
Fixing CI pipeline (deckhouse#70)
1 parent 66b8976 commit 415d063

File tree

4 files changed

+12
-30
lines changed

4 files changed

+12
-30
lines changed

.github/workflows/chart.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,20 @@ defaults:
2020

2121
jobs:
2222
tests:
23-
runs-on: "ubuntu-20.04"
23+
runs-on: ubuntu-latest
2424
steps:
25-
- uses: "actions/checkout@v2"
25+
- uses: actions/checkout@v3
2626
- uses: werf/actions/[email protected]
2727
- name: Werf lint chart
2828
run: cd "$CHART_DIR" && werf helm lint
2929
- name: Werf render chart
3030
run: cd "$CHART_DIR" && werf helm template .
3131
publish-charts:
32-
runs-on: "ubuntu-20.04"
32+
runs-on: ubuntu-latest
3333
if: "github.event_name == 'push' && github.ref == 'refs/heads/master'"
3434
needs: tests
3535
steps:
36-
- uses: "actions/checkout@v2"
36+
- uses: actions/checkout@v3
3737
- uses: werf/actions/[email protected]
3838
- name: Package werf charts
3939
run: |

.github/workflows/ci.yml

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,28 +15,11 @@ jobs:
1515
test:
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/setup-go@v2
18+
- uses: actions/setup-go@v4
1919
with:
2020
go-version: '1.19'
2121

22-
- id: go-cache-paths
23-
run: |
24-
echo "::set-output name=go-build::$(go env GOCACHE)"
25-
echo "::set-output name=go-mod::$(go env GOMODCACHE)"
26-
27-
- name: Go Build Cache
28-
uses: actions/cache@v2
29-
with:
30-
path: ${{ steps.go-cache-paths.outputs.go-build }}
31-
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
32-
33-
- name: Go Mod Cache
34-
uses: actions/cache@v2
35-
with:
36-
path: ${{ steps.go-cache-paths.outputs.go-mod }}
37-
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
38-
39-
- uses: actions/checkout@v2
22+
- uses: actions/checkout@v3
4023

4124
- name: Test With Coverage
4225
run: go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
@@ -46,17 +29,19 @@ jobs:
4629
files: coverage.txt
4730

4831
- name: golangci-lint
49-
uses: golangci/golangci-lint-action@v2
32+
uses: golangci/golangci-lint-action@v3
5033
with:
5134
args: --timeout=5m
35+
# since go test already does it in a previous step
36+
skip-pkg-cache: true
5237
build:
5338
runs-on: ubuntu-latest
5439
needs: test
5540
permissions:
5641
contents: read
5742
packages: write
5843
steps:
59-
- uses: actions/checkout@v2
44+
- uses: actions/checkout@v3
6045
# Login against a Docker registry except on PR
6146
# https://github.com/docker/login-action
6247
- name: Log into registry ${{ env.REGISTRY }}

helm/charts/k8s-image-availability-exporter/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
k8sImageAvailabilityExporter:
22
image:
33
repository: registry.deckhouse.io/k8s-image-availability-exporter/k8s-image-availability-exporter
4-
tag: v0.3.0
4+
tag: v0.5.1
55
pullPolicy: IfNotPresent
66
replicas: 1
77
resources: {}

pkg/registry_checker/indexers.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,8 @@ func (ci ControllerIndexers) validCi(cis *controllerWithContainerInfos) bool {
5656
}
5757

5858
nsList, _ := ci.namespaceIndexer.ByIndex(labeledNSIndexName, cis.Namespace)
59-
if len(nsList) == 0 {
60-
return false
61-
}
6259

63-
return true
60+
return len(nsList) != 0
6461
}
6562

6663
func namespaceIndexers(nsLabel string) cache.Indexers {

0 commit comments

Comments
 (0)