diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index 1f8052b..95af8e5 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -1,12 +1,12 @@ name: Pull Request on: - pull_request: + pull_request_target: branches: - master env: - DOCKER_FILE_PATH: build/Dockerfile + DOCKER_FILE_PATH: Dockerfile GOLANG_VERSION: 1.15.2 KUBERNETES_VERSION: "1.18.0" KIND_VERSION: "0.7.0" @@ -30,6 +30,10 @@ jobs: with: go-version: ${{ env.GOLANG_VERSION }} + - name: Install Dependencies + run: | + make install + - name: Lint run: | curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.26.0 @@ -52,16 +56,7 @@ jobs: - name: Create Kind Cluster run: | kind create cluster - - - name: Set up Cluster - run: | kubectl cluster-info - mkdir -p .local - echo "${{ secrets.SECRET_KUBERNETES_RESOURCES }}" | base64 --decode > .local/test-config.yaml - - - name: Make Install & Verify - run: | - make install - name: Test run: make test diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml index dbe71ab..891a542 100644 --- a/.github/workflows/push.yaml +++ b/.github/workflows/push.yaml @@ -6,7 +6,7 @@ on: - master env: - DOCKER_FILE_PATH: build/Dockerfile + DOCKER_FILE_PATH: Dockerfile GOLANG_VERSION: 1.15.2 KUBERNETES_VERSION: "1.18.0" KIND_VERSION: "0.7.0" @@ -35,6 +35,10 @@ jobs: with: go-version: ${{ env.GOLANG_VERSION }} + - name: Install Dependencies + run: | + make install + - name: Lint run: | curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.26.0 @@ -57,22 +61,7 @@ jobs: - name: Create Kind Cluster run: | kind create cluster - - - name: Set up Cluster - run: | kubectl cluster-info - mkdir -p .local - echo "${{ secrets.SECRET_KUBERNETES_RESOURCES }}" | base64 --decode > .local/test-config.yaml - - - name: Helm Lint - run: | - helm init - cd deployments/kubernetes/chart/reloader - helm lint - - - name: Make Install & Verify - run: | - make install - name: Test run: make test @@ -116,6 +105,7 @@ jobs: org.opencontainers.image.source=${{ github.event.repository.clone_url }} org.opencontainers.image.created=${{ steps.prep.outputs.created }} org.opencontainers.image.revision=${{ github.sha }} + ############################## ## Add steps to generate required artifacts for a release here(helm chart, operator manifest etc.) ############################## @@ -147,7 +137,7 @@ jobs: charts_dir: charts charts_url: ${{ env.HELM_REGISTRY_URL }} owner: stakater - linting: off + linting: on commit_username: stakater-user commit_email: stakater@gmail.com diff --git a/build/package/Dockerfile.build b/build/package/Dockerfile.build index dd85fd5..9406ea6 100644 --- a/build/package/Dockerfile.build +++ b/build/package/Dockerfile.build @@ -1,4 +1,4 @@ -FROM golang:1.13.9-alpine +FROM golang:1.15.2-alpine LABEL maintainer "Stakater Team" RUN apk -v --update \