Skip to content

Commit

Permalink
fix(ci): fix workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
m-yosefpor committed Sep 16, 2021
1 parent 362d848 commit f73ff38
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 175 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
name: ci
on:
push:
branches: [ main ]
tags: [ v* ]
pull_request:
branches: [ main ]

jobs:
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: latest
test:
name: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '^1.16'
- uses: RyanSiu1995/kubebuilder-action@v1.2.1
- run: make test
- uses: codecov/codecov-action@v1
with:
files: coverage.out
docker:
name: docker
runs-on: ubuntu-latest
needs:
- lint
- test
steps:
- uses: actions/checkout@v2
- uses: docker/setup-qemu-action@v1
- uses: docker/setup-buildx-action@v1
- uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/metadata-action@v3
id: meta
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- uses: docker/build-push-action@v2
with:
file: "Dockerfile"
context: .
platforms: linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
67 changes: 0 additions & 67 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

80 changes: 0 additions & 80 deletions .github/workflows/docker-publish.yml

This file was deleted.

25 changes: 0 additions & 25 deletions .github/workflows/go.yml

This file was deleted.

6 changes: 5 additions & 1 deletion controllers/route_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,11 @@ func (r *RouteReconciler) ingressForRoute(m *routev1.Route) (*netv1.Ingress, err
},
}
// Set Route instance as the owner and controller
ctrl.SetControllerReference(m, ing, r.Scheme)
err := ctrl.SetControllerReference(m, ing, r.Scheme)
if err != nil {
return nil, err
}

return ing, nil
}

Expand Down
2 changes: 0 additions & 2 deletions controllers/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"k8s.io/client-go/kubernetes/scheme"
"k8s.io/client-go/rest"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/envtest"
"sigs.k8s.io/controller-runtime/pkg/envtest/printer"
Expand All @@ -35,7 +34,6 @@ import (
// These tests use Ginkgo (BDD-style Go testing framework). Refer to
// http://onsi.github.io/ginkgo/ to learn more about Ginkgo.

var cfg *rest.Config
var k8sClient client.Client
var testEnv *envtest.Environment

Expand Down

0 comments on commit f73ff38

Please sign in to comment.