Merge pull request #6 from run-ai/fix-ci #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Argo-rollout-config-keeper CI: push to master" | |
on: | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- '.github/**' | |
- 'hack/**' | |
- 'README.md' | |
- 'Makefile' | |
- 'Dockerfile' | |
- 'PROJECT' | |
- '.gitignore' | |
- '.dockerignore' | |
- '.golangci.yml' | |
jobs: | |
ci-push-to-master: | |
name: CI - push to master | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22.4' | |
- name: Install dependencies | |
run: | | |
go mod tidy | |
go mod vendor | |
- name: Make fmt | |
run: make fmt | |
- name: Make lint | |
run: make lint | |
- name: Create Kind cluster | |
run: make create-kind-cluster | |
- name: Make test | |
env: | |
USE_EXISTING_CLUSTER: "true" | |
run: make test | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
- name: Build and push Docker image | |
run: | | |
make docker-build docker-push IMG="${{ secrets.DOCKERHUB_USERNAME }}/argo-rollout-config-keeper-operator:master.$(git rev-parse --short HEAD)" |