Skip to content

chore: upgrade kops-operator reference #353

chore: upgrade kops-operator reference

chore: upgrade kops-operator reference #353

Workflow file for this run

name: Go
on:
push:
branches: [ main ]
tags:
- '*'
pull_request:
branches: [ main ]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.22.5
- name: Run lint
uses: golangci/golangci-lint-action@v6.1.0
with:
version: latest
args: --timeout 5m0s
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.22.5
- name: Install dependencies
run: sudo apt update && sudo apt install make -y
- name: Run tests
run: make test-ci
docker-image:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
needs:
- tests
- lint
permissions:
packages: write
contents: read
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: tfgco/${{ github.event.repository.name }}
- name: Build and Push Docker image
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: |
${{ steps.meta.outputs.tags }}
tfgco/${{ github.event.repository.name }}:latest
labels: ${{ steps.meta.outputs.labels }}