Skip to content

Commit

Permalink
wip: publish only on push main, update golangci-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
DrPsychick committed Aug 15, 2024
1 parent 0c078d3 commit 6da5666
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 18 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
run: make docker-build IMG=drpsychick/mailu-operator:latest

publish:
if: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
name: Publish operator image
runs-on: ubuntu-latest
needs: build
Expand Down Expand Up @@ -64,25 +65,21 @@ jobs:
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
if: github.event_name != 'pull_request'
run: make buildx-build IMG=drpsychick/mailu-operator:${{ steps.meta.outputs.version }}

- name: Build operator install manifest
if: github.event_name != 'pull_request'
env:
RELEASE_VERSION: ${{ steps.meta.outputs.version }}
run: |
make build-installer IMG=drpsychick/mailu-operator:${{ steps.meta.outputs.version }}
- name: Commit operator install manifest
if: github.event_name != 'pull_request'
uses: stefanzweifel/git-auto-commit-action@v5
with:
file_pattern: 'dist/*.yaml'
4 changes: 4 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ issues:
linters:
- dupl
- lll
- path: "test/*"
linters:
- errcheck

linters:
disable-all: true
enable:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ GOLANGCI_LINT = $(LOCALBIN)/golangci-lint-$(GOLANGCI_LINT_VERSION)
KUSTOMIZE_VERSION ?= v5.3.0
CONTROLLER_TOOLS_VERSION ?= v0.14.0
ENVTEST_VERSION ?= release-0.17
GOLANGCI_LINT_VERSION ?= v1.57.2
GOLANGCI_LINT_VERSION ?= v1.60.1

.PHONY: kustomize
kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary.
Expand Down
37 changes: 24 additions & 13 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6da5666

Please sign in to comment.