Skip to content

chore(ci): add e2e tests to ci #194

chore(ci): add e2e tests to ci

chore(ci): add e2e tests to ci #194

Workflow file for this run

name: ci
on:
workflow_dispatch:
inputs:
dry_run:
description: 'DryRun'
required: true
default: 'true'
push:
branches:
- 'main'
paths:
- '**.go'
- 'go.mod'
- 'go.sum'
pull_request:
branches:
- 'main'
paths:
- '**.go'
- 'go.mod'
- 'go.sum'
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22
- name: Test
run: make test
- name: Create k8s Kind Cluster
uses: helm/kind-action@v1
- name: Test e2e
run: make test-e2e
with:

Check failure on line 50 in .github/workflows/ci.yaml

View workflow run for this annotation

GitHub Actions / ci

Invalid workflow file

The workflow is not valid. .github/workflows/ci.yaml (Line: 50, Col: 9): Unexpected value 'with'
cluster_name: kind
- name: Bump version
id: bump_version
uses: mathieudutour/github-tag-action@v6.2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
fetch_all_tags: true
dry_run: ${{ ! (github.event_name == 'push' && github.ref == 'refs/heads/main') }}
- name: Create a GitHub release
uses: ncipollo/release-action@v1
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
with:
tag: ${{ steps.bump_version.outputs.new_tag }}
name: ${{ steps.bump_version.outputs.new_tag }}
generateReleaseNotes: true
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5.5.1
with:
images: dbonfigli/sts-phased-rollout-operator
tags: |
type=raw,value=${{ steps.bump_version.outputs.new_tag }},enable=${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
type=raw,value=latest,enable=${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
type=ref,event=branch
- name: Log in to Docker Hub
if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event_name == 'workflow_dispatch' && github.event.inputs.dry_run == 'false')
uses: docker/login-action@v3.2.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v6.3.0
with:
context: .
push: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event_name == 'workflow_dispatch' && github.event.inputs.dry_run == 'false') }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}